Skip to content

Commit 7b9718a

Browse files
committed
refactor: simplify navigation logic in useFilterParam hook
1 parent c880bd7 commit 7b9718a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/hooks/useFilterParam.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ export function useFilterParam(
2323
const setValue = (newValue: string) => {
2424
if (!allowedValues.includes(newValue)) return; // ignore invalid values
2525
if (newValue !== value) {
26-
const nav: any = navigate;
27-
nav({
28-
search: (prev: any) => ({
26+
navigate({
27+
search: (prev) => ({
2928
...prev,
3029
[paramName]: newValue,
3130
}),

0 commit comments

Comments
 (0)