We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1def9e commit 1d7c781Copy full SHA for 1d7c781
1 file changed
src/app/layout.tsx
@@ -5,13 +5,14 @@ import type { ReactNode } from "react";
5
6
interface RootLayoutProps {
7
children: ReactNode;
8
- params: {
+ params: Promise<{
9
locale?: string;
10
- };
+ }>;
11
}
12
13
-export default function RootLayout({ children, params }: RootLayoutProps) {
14
- const locale = isSupportedLocale(params.locale) ? params.locale : FALLBACK_LOCALE;
+export default async function RootLayout({ children, params }: RootLayoutProps) {
+ const { locale: localeParam } = await params;
15
+ const locale = isSupportedLocale(localeParam) ? localeParam : FALLBACK_LOCALE;
16
17
return (
18
<html lang={locale} suppressHydrationWarning>
0 commit comments