Unverified Commit a699c980 authored by Emilio Schaedler Heinzmann's avatar Emilio Schaedler Heinzmann Committed by GitHub

docs: updates generateMetadata function signature (#54638)



Change optional arg to non-optional arg of `parent` in the `generateMetadata` API function example in oder to avoid the error shown below.
 
![Screenshot 2023-08-27 at 15 23 02](https://github.com/vercel/next.js/assets/103655828/a39dc0c0-ab1b-4a26-9ac0-1e9ddcfd11da)
parent 51528424
......@@ -57,7 +57,7 @@ type Props = {
export async function generateMetadata(
{ params, searchParams }: Props,
parent?: ResolvingMetadata
parent: ResolvingMetadata
): Promise<Metadata> {
// read route params
const id = params.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment