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 () => {