reload on login for compatibility with autologout
This commit is contained in:
@ -180,15 +180,19 @@ export default {
|
||||
commit('setToken', response.data)
|
||||
dispatch('getUser').then(userdata => {
|
||||
console.log('User Loggedin', state.isAdmin, state.isAdherent)
|
||||
if (state.isAdmin) {
|
||||
window.location.reload(true)
|
||||
}
|
||||
// have to reload systematicly because of autologout library not loaded if not logged in the begining
|
||||
// if (state.isAdmin) {
|
||||
// window.location.reload()
|
||||
// }
|
||||
if (state.isAdherent) {
|
||||
router.push({
|
||||
name: 'base'
|
||||
})
|
||||
// TODO: openCloseHamMenu(false)
|
||||
dispatch('Common/openCloseHamMenu', false)
|
||||
// router.push({
|
||||
// name: 'base'
|
||||
// })
|
||||
// // TODO: openCloseHamMenu(false)
|
||||
// dispatch('Common/openCloseHamMenu', false)
|
||||
window.location = '/base'
|
||||
} else {
|
||||
window.location.reload()
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
|
Reference in New Issue
Block a user