Unverified Commit 9e4d718d authored by Joseph's avatar Joseph Committed by GitHub

docs: root-params highligth fixes (#94620)

Once again, reformatting broke the highlights
parent 3d920355
...@@ -61,7 +61,7 @@ Given this file structure: ...@@ -61,7 +61,7 @@ Given this file structure:
Only `lang` is a root parameter. `slug` is a regular route parameter: Only `lang` is a root parameter. `slug` is a regular route parameter:
```tsx filename="app/[lang]/posts/[slug]/page.tsx" highlight={1,5} switcher ```tsx filename="app/[lang]/posts/[slug]/page.tsx" highlight={1,7} switcher
import { lang } from 'next/root-params' import { lang } from 'next/root-params'
export default async function PostPage( export default async function PostPage(
...@@ -268,7 +268,7 @@ Since `id` does not exist in the marketing root layout, `await id()` returns `un ...@@ -268,7 +268,7 @@ Since `id` does not exist in the marketing root layout, `await id()` returns `un
Root parameters work with [catch-all and optional catch-all](/docs/app/api-reference/file-conventions/dynamic-routes#catch-all-segments) segments: Root parameters work with [catch-all and optional catch-all](/docs/app/api-reference/file-conventions/dynamic-routes#catch-all-segments) segments:
```tsx filename="app/docs/[...path]/layout.tsx" highlight={4} switcher ```tsx filename="app/docs/[...path]/layout.tsx" highlight={6} switcher
import { path } from 'next/root-params' import { path } from 'next/root-params'
export default async function DocsLayout( export default async function DocsLayout(
......
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