knowyt/client/src/store/game.js

18 lines
312 B
JavaScript
Raw Normal View History

2021-08-13 20:39:49 +00:00
export const state = () => ({
2021-08-15 16:52:15 +00:00
state: "",
phase: "",
2021-08-13 20:39:49 +00:00
})
export const mutations = {
2021-08-15 20:04:10 +00:00
setStateAndPhase(state, game) {
if (game) {
const { state: gameState, phase } = game
state.state = gameState
state.phase = phase
2021-08-26 10:23:32 +00:00
} else {
2021-08-15 20:04:10 +00:00
state.state = ""
state.phase = ""
}
2021-08-13 20:39:49 +00:00
},
}