diff --git a/errors/next-dynamic-api-wrong-context.mdx b/errors/next-dynamic-api-wrong-context.mdx index 1b725299889da..1c23d1c1931b5 100644 --- a/errors/next-dynamic-api-wrong-context.mdx +++ b/errors/next-dynamic-api-wrong-context.mdx @@ -14,7 +14,7 @@ Make sure that all Dynamic API calls happen in a request scope. Example: -```jsx filename="app/page.js" +```diff filename="app/page.js" import { cookies } from 'next/headers' - const cookieStore = cookies() @@ -24,7 +24,7 @@ export default function Page() { } ``` -```jsx filename="app/foo/route.js" +```diff filename="app/foo/route.js" import { headers } from 'next/headers' - const headersList = headers()