forked from Mirrors/elk
fix: display correct percentages for multiple choice polls (#1821)
This commit is contained in:
parent
958f5967b9
commit
8c783204d3
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ const votersCount = $computed(() => poll.votersCount ?? poll.votesCount ?? 0)
|
||||||
<div
|
<div
|
||||||
v-for="(option, index) of poll.options"
|
v-for="(option, index) of poll.options"
|
||||||
:key="index" py-1 relative
|
: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>
|
<div flex justify-between pb-2 w-full>
|
||||||
<span inline-flex align-items>
|
<span inline-flex align-items>
|
||||||
|
|
Loading…
Reference in a new issue