Skip to content

Commit 1d7c781

Browse files
committed
fix
1 parent e1def9e commit 1d7c781

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/app/layout.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import type { ReactNode } from "react";
55

66
interface RootLayoutProps {
77
children: ReactNode;
8-
params: {
8+
params: Promise<{
99
locale?: string;
10-
};
10+
}>;
1111
}
1212

13-
export default function RootLayout({ children, params }: RootLayoutProps) {
14-
const locale = isSupportedLocale(params.locale) ? params.locale : FALLBACK_LOCALE;
13+
export default async function RootLayout({ children, params }: RootLayoutProps) {
14+
const { locale: localeParam } = await params;
15+
const locale = isSupportedLocale(localeParam) ? localeParam : FALLBACK_LOCALE;
1516

1617
return (
1718
<html lang={locale} suppressHydrationWarning>

0 commit comments

Comments
 (0)