slider component updated
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user