46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { routing } from "@/i18n/routing";
|
|
import type { Metadata } from "next";
|
|
import { NextIntlClientProvider } from "next-intl";
|
|
import { ThemeProvider } from "next-themes";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import "../globals.css";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "CGR App",
|
|
description: "Manager for CGR Data",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
params: { locale?: string };
|
|
}>) {
|
|
const { locale } = await params;
|
|
|
|
return (
|
|
<html lang={locale || routing.defaultLocale} suppressHydrationWarning>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
>
|
|
<ThemeProvider attribute="class" enableSystem>
|
|
<NextIntlClientProvider locale={locale || routing.defaultLocale}>
|
|
{children}
|
|
</NextIntlClientProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|