mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
In a pathname for an intercepting route, a dynamic path param might occur multiple types, e.g. `'/[locale]/example/(...)[locale]/intercepted'` (for `[locale]/example/@modal/(...)[locale]/intercepted/page.tsx`). We need to make sure that each occurence is replaced with the actual value during interpolation. The handling of such pathnames is already done correctly in the Node.js runtime, but not in the Edge runtime. fixes #70654
22 lines
398 B
TypeScript
22 lines
398 B
TypeScript
export const runtime = 'edge'
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode
|
|
params: Promise<{ locale: string }>
|
|
}) {
|
|
const locale = (await params).locale
|
|
console.log('RootLayout rendered, locale:', locale)
|
|
|
|
return (
|
|
<html lang={locale}>
|
|
<body>
|
|
<p>Locale: {locale}</p>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|