0
0
Fork 0

Add getters for the team names.

This commit is contained in:
Oliver-Akins 2020-12-10 15:19:33 -07:00
parent 299cc99c88
commit 40fcf179d7

View file

@ -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: {