diff --git a/docs/01-app/02-building-your-application/02-data-fetching/04-incremental-static-regeneration.mdx b/docs/01-app/02-building-your-application/02-data-fetching/04-incremental-static-regeneration.mdx index 7e2b5e2f509ff5..57ac33525e552a 100644 --- a/docs/01-app/02-building-your-application/02-data-fetching/04-incremental-static-regeneration.mdx +++ b/docs/01-app/02-building-your-application/02-data-fetching/04-incremental-static-regeneration.mdx @@ -86,8 +86,9 @@ export async function generateStaticParams() { } export default async function Page({ params }) { - const post = await fetch(`https://api.vercel.app/blog/${params.id}`).then( - (res) => res.json() + const { id } = await params + const post = await fetch(`https://api.vercel.app/blog/${id}`).then((res) => + res.json() ) return (
diff --git a/docs/01-app/03-api-reference/04-functions/generate-static-params.mdx b/docs/01-app/03-api-reference/04-functions/generate-static-params.mdx index 89c553a0bfaf0c..65d60a575b3292 100644 --- a/docs/01-app/03-api-reference/04-functions/generate-static-params.mdx +++ b/docs/01-app/03-api-reference/04-functions/generate-static-params.mdx @@ -355,7 +355,7 @@ export async function generateStaticParams({ export default function Page({ params, }: { - params: { category: string; product: string } + params: Promise<{ category: string; product: string }> }) { // ... }