knowyt/client/src/store/round.js
2021-09-05 21:30:13 +02:00

23 lines
483 B
JavaScript

export const state = () => ({
quote: "",
sources: [],
selections: {},
revelation: {},
})
export const mutations = {
setRound(state, game) {
if (game && game.round) {
state.quote = game.round.quote
state.sources = game.round.sources
state.selections = game.round.selections
state.revelation = game.round.revelation
} else {
state.quote = ""
state.sources = []
state.selections = {}
state.revelation = {}
}
},
}