w-lab-app/src/app/[locale]/layout.tsx
gofnnp 12836b372d main
done retaining funnel, edits compatibility & palms & home
2025-06-24 11:45:45 +04:00

59 lines
1.9 KiB
TypeScript

import "@/styles/reset.css";
import "@/styles/globals.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { notFound } from "next/navigation";
import { hasLocale, NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
import clsx from "clsx";
import { routing } from "@/i18n/routing";
import { RetainingStoreProvider } from "@/providers/retaining-store-provider";
import { ToastProvider } from "@/providers/toast-provider";
import styles from "./layout.module.scss";
export function generateStaticParams() {
return routing.locales.map(locale => ({ locale }));
}
const inter = Inter({
subsets: ["latin", "cyrillic"],
display: "swap",
variable: "--font-inter",
});
export const metadata: Metadata = {
title: "WIT",
description:
"More than 14M people have experienced the value of our products. Wit Apps, headquartered in Silicon Valley, California, is a tech company that constructs global enterprises specializing in mobile-first products. We believe in the transformative power of technology, capable of turning chaos into miracles, thus enhancing the lives of millions. To realize this vision, we integrate leading expertise in artificial intelligence with a deep understanding of consumer needs and lifestyle trends.",
};
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();
}
const messages = await getMessages();
return (
<html lang={locale}>
<body className={clsx(inter.variable, styles.body)}>
<NextIntlClientProvider messages={messages}>
<RetainingStoreProvider>
<ToastProvider maxVisible={3}>{children}</ToastProvider>
</RetainingStoreProvider>
</NextIntlClientProvider>
</body>
</html>
);
}