2026-11-15 21:00:50 +00:00
|
|
|
|
import type { Metadata } from "next";
|
|
|
|
|
|
import { Cormorant_Garamond, Inter } from "next/font/google";
|
2026-11-20 06:41:21 +00:00
|
|
|
|
import { Suspense } from "react";
|
2026-11-15 21:00:50 +00:00
|
|
|
|
|
2026-11-21 21:23:52 +00:00
|
|
|
|
import { NightSky } from "@/components/NightSky";
|
2026-11-20 06:41:21 +00:00
|
|
|
|
import { PaymentReturn } from "@/components/PaymentReturn";
|
2026-11-15 21:00:50 +00:00
|
|
|
|
import { SiteHeader } from "@/components/SiteHeader";
|
2026-11-22 10:14:15 +00:00
|
|
|
|
import { ValidationMessages } from "@/components/ValidationMessages";
|
2026-11-15 21:00:50 +00:00
|
|
|
|
import { getMe } from "@/lib/server";
|
2026-11-21 20:31:45 +00:00
|
|
|
|
import { siteUrl } from "@/lib/share";
|
2026-11-15 21:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
import "./globals.css";
|
|
|
|
|
|
|
|
|
|
|
|
const cormorant = Cormorant_Garamond({
|
|
|
|
|
|
subsets: ["latin", "latin-ext"],
|
|
|
|
|
|
weight: ["500", "600"],
|
|
|
|
|
|
variable: "--font-cormorant",
|
|
|
|
|
|
});
|
|
|
|
|
|
const inter = Inter({ subsets: ["latin", "latin-ext"], variable: "--font-inter" });
|
|
|
|
|
|
|
2026-11-21 20:31:45 +00:00
|
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
|
|
|
|
return {
|
|
|
|
|
|
// Relative canonical and alternate addresses resolve against the site's address.
|
|
|
|
|
|
metadataBase: new URL(await siteUrl()),
|
|
|
|
|
|
title: { default: "Sorsfonalak", template: "%s · Sorsfonalak" },
|
|
|
|
|
|
description: "Születési képlet, szinasztria és közösség – egy helyen.",
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2026-11-15 21:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
|
|
const me = await getMe();
|
|
|
|
|
|
return (
|
|
|
|
|
|
<html lang="hu" className={`${cormorant.variable} ${inter.variable}`}>
|
|
|
|
|
|
<body>
|
2026-11-21 21:23:52 +00:00
|
|
|
|
<NightSky />
|
2026-11-22 10:14:15 +00:00
|
|
|
|
<ValidationMessages />
|
2026-11-15 21:00:50 +00:00
|
|
|
|
{me && <SiteHeader me={me} />}
|
|
|
|
|
|
{children}
|
2026-11-20 06:41:21 +00:00
|
|
|
|
{me && (
|
|
|
|
|
|
<Suspense fallback={null}>
|
|
|
|
|
|
<PaymentReturn />
|
|
|
|
|
|
</Suspense>
|
|
|
|
|
|
)}
|
2026-11-15 21:00:50 +00:00
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|