@@ -9,9 +9,9 @@ import { getDirection } from "@/lib/locale";
|
||||
|
||||
type LocaleLayoutProps = {
|
||||
children: ReactNode;
|
||||
params: {
|
||||
params: Promise<{
|
||||
locale: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -23,9 +23,10 @@ export function generateStaticParams() {
|
||||
|
||||
export default async function LocaleLayout({
|
||||
children,
|
||||
params: { locale },
|
||||
params,
|
||||
}: LocaleLayoutProps) {
|
||||
noStore();
|
||||
const { locale } = await params;
|
||||
|
||||
if (!routing.locales.includes(locale as (typeof routing.locales)[number])) {
|
||||
notFound();
|
||||
|
||||
Reference in New Issue
Block a user