44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import "../globals.css";
|
|
import { getI18n } from "@/lib/i18n/server";
|
|
import { Providers } from "@/components/providers";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export async function generateMetadata({ params }: { params: { locale: string } }): Promise<Metadata> {
|
|
const t = await getI18n();
|
|
return {
|
|
title: t('meta.title'),
|
|
description: t('meta.description'),
|
|
};
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
params,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
params: { locale: string };
|
|
}>) {
|
|
const { locale } = params;
|
|
return (
|
|
<html lang={locale} suppressHydrationWarning>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
>
|
|
<Providers locale={locale}>
|
|
{children}
|
|
</Providers>
|
|
</body>
|
|
</html>
|
|
);
|
|
} |