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;