redirect users with token #38
This commit is contained in:
parent
c1d78fa8c1
commit
2d700c77dc
@ -46,7 +46,12 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
component: Index
|
component: Index,
|
||||||
|
beforeEnter: (_to, _from, next) => {
|
||||||
|
if (store.state.token) {
|
||||||
|
next({name: 'Search'})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user