initial commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Suspense } from "react";
|
||||
import { getDictionary } from "@/lib/dictionaries";
|
||||
import { Hero } from "@/components/sections/Hero";
|
||||
import { Features } from "@/components/sections/Features";
|
||||
import { Pricing } from "@/components/sections/Pricing";
|
||||
import { FAQ } from "@/components/sections/Faq";
|
||||
import { BlogPreview } from "@/components/sections/BlogPreview";
|
||||
|
||||
export default async function Home({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ lang: string }>;
|
||||
}) {
|
||||
// РАЗВОРАЧИВАЕМ PARAMS
|
||||
const { lang } = await params;
|
||||
|
||||
// Получаем словарь, используя проверенную строку
|
||||
const dict = await getDictionary(lang);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Hero dict={dict.hero} />
|
||||
<Features dict={dict.features} />
|
||||
<Pricing dict={dict.pricing} />
|
||||
<FAQ dict={dict.faq} />
|
||||
|
||||
{/*
|
||||
<Suspense fallback={<div className="py-20 text-center">Loading...</div>}>
|
||||
<BlogPreview dict={dict.blog} lang={lang} />
|
||||
</Suspense>
|
||||
*/}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user