diff --git a/apps/next-with-i18n/app/(website)/[locale]/[...path]/page.tsx b/apps/next-with-i18n/app/(website)/[locale]/[...path]/page.tsx index 36f442e09..f0f75d182 100644 --- a/apps/next-with-i18n/app/(website)/[locale]/[...path]/page.tsx +++ b/apps/next-with-i18n/app/(website)/[locale]/[...path]/page.tsx @@ -2,10 +2,11 @@ import { Page } from '@/components/Page' import { loadPage } from '@/data/sanity' export default async function DynamicRoute({ - params: { path, locale }, + params, }: { - params: { path: string[]; locale: string } + params: Promise<{ path: string[]; locale: string }> }) { + const { path, locale } = await params const pathname = `/${path.join('/')}` const data = await loadPage(pathname, locale) diff --git a/apps/next-with-i18n/app/(website)/[locale]/layout.tsx b/apps/next-with-i18n/app/(website)/[locale]/layout.tsx index d3a0edcd8..8e3a4dce1 100644 --- a/apps/next-with-i18n/app/(website)/[locale]/layout.tsx +++ b/apps/next-with-i18n/app/(website)/[locale]/layout.tsx @@ -18,21 +18,22 @@ const sans = Inter({ }) export default async function RootLayout({ - params: { locale }, + params, children, }: { - params: { locale: string } + params: Promise<{ locale: string }> children: React.ReactNode }) { + const { locale } = await params return (
{children} - {draftMode().isEnabled && ( + {(await draftMode()).isEnabled && (