slider component updated

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-04-28 11:29:06 +05:00
parent cfa84d04ab
commit 77c6baaa55
25 changed files with 1308 additions and 1770 deletions

View File

@@ -5,30 +5,35 @@ import Contact from "@/components/pageParts/contact";
import UpScrollIcon from "@/components/lib_components/upScroll";
import { Suspense } from "react";
import Time from "@/components/lib_components/time";
import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
export default async function LangLayout({
children,
params,
}: {
children: React.ReactNode;
params: Promise<{ lang: string }>; // ✅ Promise shaklda
params: Promise<{ lang: string }>;
}) {
const { lang } = await params; // ✅ await bilan destructuring
const { lang } = await params;
const messages = await getMessages();
return (
<html lang={lang} dir="rtl" suppressHydrationWarning>
<body>
<Suspense fallback={null}>
<Header />
</Suspense>
<Navbar />
{children}
<section id="contact">
<Contact />
</section>
<Footer />
<UpScrollIcon />
<Time />
<NextIntlClientProvider messages={messages}>
<Suspense fallback={null}>
<Header />
</Suspense>
<Navbar />
{children}
<section id="contact">
<Contact />
</section>
<Footer />
<UpScrollIcon />
<Time />
</NextIntlClientProvider>
</body>
</html>
);