export const state = () => ({ state: "", phase: "", name: "", }) export const mutations = { setStateAndPhase(state, game) { if (game) { const { state: gameState, phase, name } = game state.state = gameState state.phase = phase state.name = name } else { state.state = "" state.phase = "" state.name = "" } }, }