redirect users with token #38
This commit is contained in:
parent
c3cc51dbf9
commit
e6e44d5de8
@ -46,7 +46,12 @@ const routes = [
|
||||
{
|
||||
path: '/',
|
||||
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