remove sizeDE, sizeGB from store. commit logout to store before redirect

This commit is contained in:
Moriz Wahl 2021-04-20 12:09:07 +02:00
parent c3c4b52807
commit dd9b10a4cb
3 changed files with 2 additions and 11 deletions

View File

@ -16,8 +16,6 @@ export const store = new Vuex.Store({
session_id: null,
email: '',
language: 'en',
sizeDE: 'normal',
sizeGB: 'big',
user: {
name: '',
balance: 0,
@ -37,13 +35,6 @@ export const store = new Vuex.Store({
mutations: {
language: (state, language) => {
state.language = language
if (state.language == 'de') {
state.sizeDE = 'big'
state.sizeGB = 'normal'
} else {
state.sizeDE = 'normal'
state.sizeGB = 'big'
}
},
email: (state, email) => {
state.email = email

View File

@ -116,8 +116,8 @@ export default {
this.activeNotifications = false
},
logout() {
this.$router.push('/login')
this.$store.dispatch('logout')
this.$router.push('/login')
},
},
}

View File

@ -188,8 +188,8 @@ export default {
this.$router.push('/thx')
} else {
// todo: Display a proper error message!
this.$router.push('/login')
this.$store.dispatch('logout')
this.$router.push('/login')
}
},
},