fix: disable progress bar for native a tag redirection, for there are issues with hash jumping

This commit is contained in:
DIYgod 2023-05-10 23:43:48 +01:00
parent 4d1f4d6830
commit ee663250a3
No known key found for this signature in database
1 changed files with 5 additions and 5 deletions

View File

@ -20,11 +20,11 @@ export const useAppRouterEventerListener = () => {
const rawPush = router.push
const rawReplace = router.replace
const popstateHandler = () => {
startChangeCallback()
}
// const popstateHandler = () => {
// startChangeCallback()
// }
window.addEventListener("popstate", popstateHandler)
// window.addEventListener("popstate", popstateHandler)
router.push = (...rest) => {
startChangeCallback()
@ -44,7 +44,7 @@ export const useAppRouterEventerListener = () => {
router.push = rawPush
router.replace = rawReplace
window.removeEventListener("popstate", popstateHandler)
// window.removeEventListener("popstate", popstateHandler)
}
}, [])