Skip to content

Commit

Permalink
fix(ranking): 切换页面时,预测分数不刷新
Browse files Browse the repository at this point in the history
  • Loading branch information
XYShaoKang committed Feb 2, 2023
1 parent ff319a7 commit ecf82f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/pages/ranking/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function useUrlChange() {
const handle = debounce(() => {
setParam(getParam())
}, 100)
window.addEventListener('afterurlchange', handle)
window.addEventListener('urlchange', handle)
return () => {
window.removeEventListener('afterurlchange', handle)
window.removeEventListener('urlchange', handle)
}
}, [])
useEffect(() => {
Expand Down

0 comments on commit ecf82f5

Please sign in to comment.