From 02cecebbaea471cb52310e6e8359d1d66ede6eb7 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 19 Dec 2020 16:56:34 -0700 Subject: [PATCH] Use the button labels from the store rather than hard-coded values. --- web/src/components/Hand.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/web/src/components/Hand.vue b/web/src/components/Hand.vue index 86eecec..837487d 100644 --- a/web/src/components/Hand.vue +++ b/web/src/components/Hand.vue @@ -13,15 +13,7 @@ class="card-button clickable" @click.stop="sendCard(cardIndex)" > - - Ask {{ $store.state.writer_name }} - - - Answer Question - - - Unknown Role - + {{ buttonLabel }} @@ -44,6 +36,15 @@ export default { isWriter() { return this.userRole == this.$store.state.writer_name; }, + buttonLabel() { + if (this.isGuesser) { + return this.$store.state.guesser_card_button + } else if (this.isWriter) { + return this.$store.state.writer_card_button + } else { + return `Unknown Role` + } + }, }, methods: { sendCard(cardIndex) {