language Switcher added
This commit is contained in:
25
app/[locale]/home/page.tsx
Normal file
25
app/[locale]/home/page.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import {
|
||||
AboutUs,
|
||||
Banner,
|
||||
Blog,
|
||||
Line,
|
||||
OurService,
|
||||
Statistics,
|
||||
Testimonial,
|
||||
Video,
|
||||
} from "@/components/pages/home";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="bg-slate-950">
|
||||
<Banner />
|
||||
<Statistics />
|
||||
<AboutUs />
|
||||
<Video />
|
||||
<OurService />
|
||||
<Testimonial />
|
||||
<Line />
|
||||
<Blog />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -4,9 +4,8 @@ import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { Analytics } from "@vercel/analytics/next";
|
||||
import "./globals.css";
|
||||
import { Footer, Navbar } from "@/components/layout";
|
||||
|
||||
const _geist = Geist({ subsets: ["latin"] });
|
||||
const _geistMono = Geist_Mono({ subsets: ["latin"] });
|
||||
import { NextIntlClientProvider } from "next-intl";
|
||||
import { getMessages } from "next-intl/server";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "FireForce - Emergency Services",
|
||||
@@ -32,18 +31,24 @@ export const metadata: Metadata = {
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
params: any;
|
||||
}>) {
|
||||
const { locale } = await params;
|
||||
const messages: any = await getMessages();
|
||||
return (
|
||||
<html lang="en">
|
||||
<html lang={locale} suppressHydrationWarning>
|
||||
<body className={`font-sans antialiased`}>
|
||||
<Navbar />
|
||||
{children}
|
||||
<Footer />
|
||||
<Analytics />
|
||||
<NextIntlClientProvider messages={messages} locale={locale}>
|
||||
<Navbar />
|
||||
{children}
|
||||
<Footer />
|
||||
<Analytics />
|
||||
</NextIntlClientProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
24
app/page.tsx
24
app/page.tsx
@@ -1,25 +1,5 @@
|
||||
import {
|
||||
AboutUs,
|
||||
Banner,
|
||||
Blog,
|
||||
Line,
|
||||
OurService,
|
||||
Statistics,
|
||||
Testimonial,
|
||||
Video,
|
||||
} from "@/components/pages/home";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="bg-slate-950">
|
||||
<Banner />
|
||||
<Statistics />
|
||||
<AboutUs />
|
||||
<Video />
|
||||
<OurService />
|
||||
<Testimonial />
|
||||
<Line />
|
||||
<Blog />
|
||||
</main>
|
||||
);
|
||||
return redirect('/uz/home')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user