0
0
Fork 0

Add mutations that we'll need so vuex-persist actually works

This commit is contained in:
Oliver-Akins 2021-01-01 12:55:36 -07:00
parent 8caac8812e
commit 3df1218ebb

View file

@ -59,9 +59,25 @@ export default new Vuex.Store({
return state[`team_${3 - state.team}`].name;
};
return ``;
}
},
},
mutations: {
player(state, data) {
if (data.name)
state.name = data.name
if (data.role)
state.role = data.role
if (data.team)
state.team = data.team
if (data.host)
state.is_host = data.host
},
game_code(state, game_code) {
state.game_code = game_code;
},
view(state, target) {
state.view = target;
},
},
actions: {
},