41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { ThemeProvider } from "@/components/sections/theme/theme-provider";
|
|
import "../globals.css";
|
|
import { getDictionary } from "@/lib/dictionaries";
|
|
import { Header } from "@/components/sections/Header";
|
|
import { JetBrains_Mono } from "next/font/google"; // Импортируем шрифт
|
|
|
|
// Настраиваем JetBrains Mono
|
|
const jetbrainsMono = JetBrains_Mono({
|
|
subsets: ["latin", "cyrillic"], // Важно добавить cyrillic для русского языка
|
|
display: "swap",
|
|
});
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: Promise<{ lang: string }>;
|
|
}) {
|
|
const { lang } = await params;
|
|
const dict = await getDictionary(lang);
|
|
|
|
return (
|
|
<html lang={lang} suppressHydrationWarning>
|
|
<body
|
|
className={`${jetbrainsMono.className} bg-background text-foreground min-h-screen flex flex-col transition-colors duration-300`}
|
|
>
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="dark"
|
|
enableSystem
|
|
disableTransitionOnChange
|
|
>
|
|
<Header dict={dict.nav} lang={lang} />
|
|
<main className="flex-1 mt-32">{children}</main>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|