Skip to content

Commit 0074a9c

Browse files
committed
fix router params not updated on navigation
1 parent 26ca565 commit 0074a9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/use-router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const useRouter = ({
108108
}
109109
onNavigate?.(next.name);
110110
animate(0, 1, 150);
111-
return [...state, next];
111+
return [...state, {...next, params: params || next.params}];
112112
});
113113
}, 100);
114114
},

0 commit comments

Comments
 (0)