docs: Add missing parameters to both useSelectedLayoutSegment
& useSelectedLayoutSegments
(#53602)
This PR adds missing parameters to the `useSelectedLayoutSegment` & `useSelectedLayoutSegments` hooks since they take *optional* `parallelRoutesKey`. Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
This commit is contained in:
parent
a607deaaf7
commit
7ac6bb1a88
2 changed files with 5 additions and 4 deletions
|
@ -39,10 +39,10 @@ export default function ExampleClientComponent() {
|
|||
## Parameters
|
||||
|
||||
```tsx
|
||||
const segment = useSelectedLayoutSegment()
|
||||
const segment = useSelectedLayoutSegment(parallelRoutesKey?: string)
|
||||
```
|
||||
|
||||
`useSelectedLayoutSegment` does not take any parameters.
|
||||
`useSelectedLayoutSegment` _optionally_ accepts a [`parallelRoutesKey`](/docs/app/building-your-application/routing/parallel-routes#useselectedlayoutsegments), which allows you to read the active route segment within that slot.
|
||||
|
||||
## Returns
|
||||
|
||||
|
|
|
@ -51,10 +51,11 @@ export default function ExampleClientComponent() {
|
|||
## Parameters
|
||||
|
||||
```tsx
|
||||
const segments = useSelectedLayoutSegments()
|
||||
const segments = useSelectedLayoutSegments(parallelRoutesKey?: string)
|
||||
```
|
||||
|
||||
`useSelectedLayoutSegments` does not take any parameters.
|
||||
`useSelectedLayoutSegments` _optionally_ accepts a [`parallelRoutesKey`](/docs/app/building-your-application/routing/parallel-routes#useselectedlayoutsegments), which allows you to read the active route segment within that slot.
|
||||
s.
|
||||
|
||||
## Returns
|
||||
|
||||
|
|
Loading…
Reference in a new issue