We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0feaf15 commit a90f4a9Copy full SHA for a90f4a9
examples/example-app-router/src/components/LocaleSwitcherSelect.tsx
@@ -25,13 +25,10 @@ export default function LocaleSwitcherSelect({
25
const nextLocale = event.target.value;
26
startTransition(() => {
27
router.replace(
28
- {
29
- pathname,
30
- // TypeScript validates that only known `params` are used in combination
31
- // with a given `pathname`. Since the two will always match for the current
32
- // route, we can skip runtime checks.
33
- params: params as any
34
- },
+ // @ts-expect-error -- TypeScript will validate that only known `params`
+ // are used in combination with a given `pathname`. Since the two will
+ // always match for the current route, we can skip runtime checks.
+ { pathname, params },
35
{locale: nextLocale}
36
);
37
});
0 commit comments