Skip to content

Commit

Permalink
fix: display correct percentages for multiple choice polls (elk-zone#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidhaan authored and DataDrivenMD committed Mar 11, 2023
1 parent a76af48 commit 4a814f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/status/StatusPoll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const votersCount = $computed(() => poll.votersCount ?? poll.votesCount ?? 0)
<div
v-for="(option, index) of poll.options"
:key="index" py-1 relative
:style="{ '--bar-width': toPercentage((option.votesCount || 0) / poll.votesCount) }"
:style="{ '--bar-width': toPercentage((option.votesCount || 0) / votersCount) }"
>
<div flex justify-between pb-2 w-full>
<span inline-flex align-items>
Expand Down

0 comments on commit 4a814f5

Please sign in to comment.