diff --git a/test/e2e/app-dir/interception-middleware-rewrite/app/[lang]/layout.tsx b/test/e2e/app-dir/interception-middleware-rewrite/app/[lang]/layout.tsx index 521cc03120ad5..9c372385c7bd8 100644 --- a/test/e2e/app-dir/interception-middleware-rewrite/app/[lang]/layout.tsx +++ b/test/e2e/app-dir/interception-middleware-rewrite/app/[lang]/layout.tsx @@ -1,6 +1,10 @@ import Link from 'next/link' -export default function Layout({ children, modal, params }) { +export default async function Layout(props) { + const params = await props.params + + const { children, modal } = props + return ( <>
diff --git a/test/e2e/app-dir/navigation/app/not-found/clientcomponent/page.js b/test/e2e/app-dir/navigation/app/not-found/clientcomponent/page.js index 066490779210e..4d28919b28e72 100644 --- a/test/e2e/app-dir/navigation/app/not-found/clientcomponent/page.js +++ b/test/e2e/app-dir/navigation/app/not-found/clientcomponent/page.js @@ -2,8 +2,8 @@ import ClientComp from './client-component' import { headers } from 'next/headers' -export default function Page() { +export default async function Page() { // Opt-in to SSR. - headers() + await headers() return } diff --git a/test/e2e/app-dir/navigation/app/redirect/clientcomponent/page.js b/test/e2e/app-dir/navigation/app/redirect/clientcomponent/page.js index 5b6bb43c2cc52..36a32fbfb4089 100644 --- a/test/e2e/app-dir/navigation/app/redirect/clientcomponent/page.js +++ b/test/e2e/app-dir/navigation/app/redirect/clientcomponent/page.js @@ -1,8 +1,8 @@ import ClientComp from './client-component' import { headers } from 'next/headers' -export default function Page() { +export default async function Page() { // Opt-in to SSR. - headers() + await headers() return } diff --git a/test/e2e/app-dir/parallel-routes-breadcrumbs/app/[artist]/[album]/page.tsx b/test/e2e/app-dir/parallel-routes-breadcrumbs/app/[artist]/[album]/page.tsx index bbff22e628317..2d75682397c44 100644 --- a/test/e2e/app-dir/parallel-routes-breadcrumbs/app/[artist]/[album]/page.tsx +++ b/test/e2e/app-dir/parallel-routes-breadcrumbs/app/[artist]/[album]/page.tsx @@ -5,7 +5,7 @@ export default async function Page({ params }) { const { artist, album } = await params return (
-

Album: {params.album}

+

Album: {album}

    {tracks.map((track) => (
  • diff --git a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic-catchall/[...slug]/page.js b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic-catchall/[...slug]/page.js index 5dece6d1e3e8d..ed46ba635ec12 100644 --- a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic-catchall/[...slug]/page.js +++ b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic-catchall/[...slug]/page.js @@ -1,6 +1,7 @@ import Link from 'next/link' -export default function Page({ params }) { +export default async function Page(props) { + const params = await props.params const nextUrl = [...params.slug, 'slug'] return ( <> diff --git a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/[second]/page.js b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/[second]/page.js index 2d1c41c94d19d..620b774905cf1 100644 --- a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/[second]/page.js +++ b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/[second]/page.js @@ -1,6 +1,7 @@ import Link from 'next/link' -export default function Page({ params }) { +export default async function Page(props) { + const params = await props.params return ( <> To basic inner diff --git a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/page.js b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/page.js index e2fb10ecf4863..1e55ab8182e1d 100644 --- a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/page.js +++ b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/dynamic/[first]/page.js @@ -1,6 +1,7 @@ import Link from 'next/link' -export default function Page({ params }) { +export default async function Page(props) { + const params = await props.params return ( <> To inner dynamic diff --git a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/static-mpa-navigation/[slug]/page.js b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/static-mpa-navigation/[slug]/page.js index c039cd2120bf6..b451df17560ef 100644 --- a/test/e2e/app-dir/root-layout/app/(mpa-navigation)/static-mpa-navigation/[slug]/page.js +++ b/test/e2e/app-dir/root-layout/app/(mpa-navigation)/static-mpa-navigation/[slug]/page.js @@ -2,7 +2,8 @@ import Link from 'next/link' export const dynamicParams = false -export default function Page({ params }) { +export default async function Page(props) { + const params = await props.params return ( <> Static page

    } diff --git a/test/e2e/app-dir/searchparams-reuse-loading/app/page.tsx b/test/e2e/app-dir/searchparams-reuse-loading/app/page.tsx index 35638acf98651..5cc9a6f30ef54 100644 --- a/test/e2e/app-dir/searchparams-reuse-loading/app/page.tsx +++ b/test/e2e/app-dir/searchparams-reuse-loading/app/page.tsx @@ -1,6 +1,7 @@ import Link from 'next/link' -export default function Page({ searchParams }) { +export default async function Page(props) { + const searchParams = await props.searchParams return ( <>
    {JSON.stringify(searchParams)}
    diff --git a/test/e2e/app-dir/searchparams-reuse-loading/app/params-first/page.tsx b/test/e2e/app-dir/searchparams-reuse-loading/app/params-first/page.tsx index bf0d4bc715f81..2ac9662385de3 100644 --- a/test/e2e/app-dir/searchparams-reuse-loading/app/params-first/page.tsx +++ b/test/e2e/app-dir/searchparams-reuse-loading/app/params-first/page.tsx @@ -1,6 +1,7 @@ import Link from 'next/link' -export default async function Home({ searchParams }) { +export default async function Home(props) { + const searchParams = await props.searchParams return (

    diff --git a/test/e2e/app-dir/searchparams-reuse-loading/app/root-page-first/page.tsx b/test/e2e/app-dir/searchparams-reuse-loading/app/root-page-first/page.tsx index 9277cd0537614..59b79f6e695c2 100644 --- a/test/e2e/app-dir/searchparams-reuse-loading/app/root-page-first/page.tsx +++ b/test/e2e/app-dir/searchparams-reuse-loading/app/root-page-first/page.tsx @@ -1,6 +1,7 @@ import Link from 'next/link' -export default async function Home({ searchParams }) { +export default async function Home(props) { + const searchParams = await props.searchParams return (

    diff --git a/test/integration/app-dir-export/app/another/[slug]/page.js b/test/integration/app-dir-export/app/another/[slug]/page.js index 9c4a7e34f303e..d8886cd11c8dc 100644 --- a/test/integration/app-dir-export/app/another/[slug]/page.js +++ b/test/integration/app-dir-export/app/another/[slug]/page.js @@ -6,7 +6,8 @@ export function generateStaticParams() { return [{ slug: 'first' }, { slug: 'second' }] } -export default function Page({ params }) { +export default async function Page(props) { + const params = await props.params return (

    {params.slug}