refactor: Remove next parameter from router guards
This commit is contained in:
parent
e575881c28
commit
3728ae57b4
|
|
@ -22,7 +22,7 @@ const router = createRouter({
|
||||||
if (import.meta.hot)
|
if (import.meta.hot)
|
||||||
handleHotUpdate(router)
|
handleHotUpdate(router)
|
||||||
|
|
||||||
router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => {
|
router.beforeEach(async (to: EnhancedRouteLocation) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
|
|
||||||
const routeCacheStore = useRouteCacheStore()
|
const routeCacheStore = useRouteCacheStore()
|
||||||
|
|
@ -36,8 +36,6 @@ router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => {
|
||||||
|
|
||||||
if (isLogin() && !userStore.userInfo?.uid)
|
if (isLogin() && !userStore.userInfo?.uid)
|
||||||
await userStore.info()
|
await userStore.info()
|
||||||
|
|
||||||
next()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue