From f4c5bf6d2c634e0fb25ffa4b3e17c319ef68326c Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 9 Nov 2023 04:39:50 +0100 Subject: [PATCH] Show which shares will be bought --- vue/src/components/Market.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vue/src/components/Market.vue b/vue/src/components/Market.vue index ac5f2ce..c0d21c2 100644 --- a/vue/src/components/Market.vue +++ b/vue/src/components/Market.vue @@ -20,7 +20,7 @@ - + @@ -38,8 +38,8 @@ const route = useRoute() const marketId = route.params.id const selected = ref(null) const showForm = computed(() => selected.value !== null) -const yesClass = computed(() => selected.value === 'yes' ? ['active'] : []) -const noClass = computed(() => selected.value === 'no' ? ['active'] : []) +const yesClass = computed(() => selected.value === 'YES' ? ['active'] : []) +const noClass = computed(() => selected.value === 'NO' ? ['active'] : []) // how much wants the user bet? const stake = ref(null) @@ -83,15 +83,15 @@ const noShareId = computed(() => { return market?.value.Shares.find(s => s.Description === 'NO').Id }) const shareId = computed(() => { - return selected.value === 'yes' ? yesShareId.value : noShareId.value + return selected.value === 'YES' ? yesShareId.value : noShareId.value }) const toggleYes = () => { - selected.value = selected.value === 'yes' ? null : 'yes' + selected.value = selected.value === 'YES' ? null : 'YES' } const toggleNo = () => { - selected.value = selected.value === 'no' ? null : 'no' + selected.value = selected.value === 'NO' ? null : 'NO' } const submitForm = async () => {