44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { NextIntlClientProvider } from "next-intl";
|
|
import { getMessages } from "next-intl/server";
|
|
import { routing } from "@/i18n/routing";
|
|
import { notFound } from "next/navigation";
|
|
import { NavShell } from "@/components/layout/nav-shell";
|
|
|
|
export function generateStaticParams() {
|
|
return routing.locales.map((locale) => ({ locale }));
|
|
}
|
|
|
|
export default async function LocaleLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: Promise<{ locale: string }>;
|
|
}) {
|
|
const { locale } = await params;
|
|
|
|
if (!routing.locales.includes(locale as any)) {
|
|
notFound();
|
|
}
|
|
|
|
const messages = await getMessages();
|
|
|
|
return (
|
|
<html lang={locale} className="dark">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>PieCed Portal</title>
|
|
<meta
|
|
name="description"
|
|
content="PieCed IT — Multi-tenant AI assistant platform"
|
|
/>
|
|
</head>
|
|
<body className="min-h-screen bg-surface-0 text-text-primary antialiased">
|
|
<NextIntlClientProvider messages={messages}>
|
|
<NavShell>{children}</NavShell>
|
|
</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|