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