- Remove BuyCtaDialog import/usage from root layout (TurboStarter boilerplate promo) - Add overflow-x-hidden on html and body to prevent right-side empty space - Add w-full on body for proper full-width stretching Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
996 B
TypeScript
40 lines
996 B
TypeScript
import { notFound } from "next/navigation";
|
|
|
|
import { config, isLocaleSupported } from "@turbostarter/i18n";
|
|
|
|
import { getMetadata } from "~/lib/metadata";
|
|
import { Providers } from "~/lib/providers/providers";
|
|
import { ImpersonatingBanner } from "~/modules/admin/users/user/impersonating-banner";
|
|
import { BaseLayout } from "~/modules/common/layout/base";
|
|
import { Toaster } from "~/modules/common/toast";
|
|
|
|
export function generateStaticParams() {
|
|
return config.locales.map((locale) => ({ locale }));
|
|
}
|
|
|
|
export const generateMetadata = getMetadata();
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: Promise<{ locale: string }>;
|
|
}) {
|
|
const locale = (await params).locale;
|
|
|
|
if (!isLocaleSupported(locale)) {
|
|
return notFound();
|
|
}
|
|
|
|
return (
|
|
<BaseLayout locale={locale}>
|
|
<Providers locale={locale}>
|
|
<ImpersonatingBanner />
|
|
{children}
|
|
<Toaster />
|
|
</Providers>
|
|
</BaseLayout>
|
|
);
|
|
}
|