moving otherTravelers in the role modal from a computed function to spreading in mapstate for clarity and code style matching

This commit is contained in:
Dave 2021-01-25 15:48:46 +00:00
parent a95b3065bd
commit bee0eba732
1 changed files with 3 additions and 5 deletions

View File

@ -20,7 +20,7 @@
</ul> </ul>
<ul class="tokens" v-if="tab === 'otherTravelers'"> <ul class="tokens" v-if="tab === 'otherTravelers'">
<li <li
v-for="role in otherTravelers" v-for="role in otherTravelers.values()"
:class="[role.team]" :class="[role.team]"
:key="role.id" :key="role.id"
@click="setRole(role)" @click="setRole(role)"
@ -54,9 +54,6 @@ export default {
components: { Token, Modal }, components: { Token, Modal },
props: ["playerIndex"], props: ["playerIndex"],
computed: { computed: {
otherTravelers() {
return [...this.$store.state.otherTravelers.values()];
},
availableRoles() { availableRoles() {
const availableRoles = []; const availableRoles = [];
const players = this.$store.state.players.players; const players = this.$store.state.players.players;
@ -74,7 +71,8 @@ export default {
return availableRoles; return availableRoles;
}, },
...mapState(["modals", "roles", "session"]), ...mapState(["modals", "roles", "session"]),
...mapState("players", ["players"]) ...mapState("players", ["players"]),
...mapState(["otherTravelers"])
}, },
data() { data() {
return { return {