1
0

feat: redirect the user to the last page they were on before logging in after login

This commit is contained in:
kolaente
2021-10-13 21:53:39 +02:00
parent 97dd55d946
commit 9a2f95ecc6
5 changed files with 44 additions and 5 deletions

View File

@ -19,6 +19,7 @@
import {mapState} from 'vuex'
import logoUrl from '@/assets/logo-full.svg'
import { saveLastVisited } from '@/helpers/saveLastVisited'
export default {
name: 'contentNoAuth',
@ -46,6 +47,7 @@ export default {
localStorage.getItem('passwordResetToken') === null &&
localStorage.getItem('emailConfirmToken') === null
) {
saveLastVisited(this.$route.name, this.$route.params)
this.$router.push({name: 'user.login'})
}
},