diff --git a/web/src/store/index.js b/web/src/store/index.js index aa2264c..08961a5 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -36,6 +36,20 @@ export default new Vuex.Store({ id: null, players: [], }, + getters: { + teamName(state) { + if (state.team > 0) { + return state[`team_${state.team}`].name; + }; + return ``; + }, + otherTeamName(state) { + if (state.team > 0) { + return state[`team_${3 - state.team}`].name; + }; + return ``; + } + }, mutations: { }, actions: {