Skip to content

Commit

Permalink
feat(docs): improve next useRouter docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyleen77 committed Feb 28, 2025
1 parent 30fd320 commit d5e8827
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/docs/content/docs/next/hooks/use-router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ useRouter(options?: RouterProgressOptions): AppRouterProgressInstance;
| startPosition | number | undefined | The start position of the progress bar. |
| disableSameURL | boolean | `true` | Disable the progress bar when the URL is the same. |
| basePath | string | undefined | The base path if you use a `basePath` in your app. |
| i18nPath | boolean | `false` | Takes into account the first parameter of the URL (e.g. /en) |
| customRouter | () => AppRouterInstance | undefined | A custom router instance. |

<Callout title="Note">
Expand All @@ -58,6 +59,7 @@ interface RouterProgressOptions {
startPosition?: number;
disableSameURL?: boolean;
basePath?: string;
i18nPath?: boolean;
customRouter?: () => AppRouterInstance;
}
```
Expand Down Expand Up @@ -187,6 +189,7 @@ router.refresh({ startPosition: 0.3 });
| startPosition | number | undefined | The start position of the progress bar. |
| disableSameURL | boolean | `true` | Disable the progress bar when the URL is the same. |
| basePath | string | undefined | The base path if you use a `basePath` in your app. |
| i18nPath | boolean | `false` | Takes into account the first parameter of the URL (e.g. /en) |
| _...customRouterOptions_ | any | undefined | Any custom options for the router, by default we use the next `NavigateOptions`. |

<Callout title="Note">
Expand All @@ -201,6 +204,7 @@ interface RouterProgressOptions {
startPosition?: number;
disableSameURL?: boolean;
basePath?: string;
i18nPath?: boolean;
}
```

Expand Down

0 comments on commit d5e8827

Please sign in to comment.