new web sayt

This commit is contained in:
nabijonovdavronbek619@gmail.com
2025-11-25 21:06:55 +05:00
parent bef940d9d8
commit f9d27ec11d
29 changed files with 3978 additions and 55 deletions

26
app/[locale]/layout.tsx Normal file
View File

@@ -0,0 +1,26 @@
import { ReactNode } from "react";
import { notFound } from "next/navigation";
import { locales } from "@/i18n.config";
export function generateStaticParams() {
return locales.map((locale) => ({ locale }));
}
interface LocaleLayoutProps {
children: ReactNode;
params: Promise<{
locale: string;
}>;
}
async function LocaleLayout({ children, params }: LocaleLayoutProps) {
const { locale } = await params;
if (!locales.includes(locale as any)) {
notFound();
}
return <>{children}</>;
}
export default LocaleLayout;

36
app/[locale]/page.tsx Normal file
View File

@@ -0,0 +1,36 @@
"use client";
import { Navbar } from "@/components/Navbar";
import { ShowCase } from "@/components/ShowCase";
import { About } from "@/components/About";
import { ProductsGrid } from "@/components/ProductsGrid";
import { FAQ } from "@/components/FAQ";
import { ContactForm } from "@/components/ContactForm";
import { Footer } from "@/components/Footer";
const HERO_IMAGES = [
"/images/hero-pump-1.jpg",
"/images/hero-pump-2.jpg",
"/images/hero-pump-3.jpg",
"/images/hero-pump-4.jpg",
"/images/hero-pump-5.jpg",
];
export default function Home() {
return (
<main>
<Navbar />
<ShowCase
titleKey="hero.title"
subtitleKey="hero.subtitle"
ctaLabelKey="hero.cta"
images={HERO_IMAGES}
/>
<About />
<ProductsGrid />
<FAQ />
<ContactForm />
<Footer />
</main>
);
}