2025-12-10 16:39:13 +07:00
|
|
|
import Providers from '@/app/providers/getQueryServer'
|
|
|
|
|
import type { Metadata } from "next";
|
|
|
|
|
import { NextIntlClientProvider, hasLocale } from 'next-intl';
|
|
|
|
|
import { notFound } from 'next/navigation';
|
|
|
|
|
import { routing } from '@/i18n/routing';
|
2025-12-29 14:00:02 +07:00
|
|
|
import { ToastProvider } from '@/app/providers/ToastProvider';
|
2025-12-10 16:39:13 +07:00
|
|
|
import "../styles/globals.css";
|
|
|
|
|
import "../styles/global-styles.scss";
|
|
|
|
|
|
|
|
|
|
export function generateStaticParams() {
|
|
|
|
|
return routing.locales.map((locale: any) => ({ locale }));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: "No copy",
|
|
|
|
|
description: "No copy",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default async function RootLayout({
|
|
|
|
|
children,
|
|
|
|
|
params
|
|
|
|
|
}: Readonly<{
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
params: Promise<{ locale: string }>;
|
|
|
|
|
}>) {
|
|
|
|
|
const { locale } = await params;
|
|
|
|
|
if (!hasLocale(routing.locales, locale)) {
|
|
|
|
|
notFound();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<html lang={locale}>
|
|
|
|
|
<body>
|
|
|
|
|
<NextIntlClientProvider>
|
|
|
|
|
<Providers>
|
|
|
|
|
{children}
|
2025-12-29 14:00:02 +07:00
|
|
|
<ToastProvider />
|
2025-12-10 16:39:13 +07:00
|
|
|
</Providers>
|
|
|
|
|
</NextIntlClientProvider>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|