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:
Ahmed Abdelbaset 2023-08-25 02:14:47 +03:00 committed by GitHub
parent a607deaaf7
commit 7ac6bb1a88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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