fix: display correct percentages for multiple choice polls (#1821)

pull/1822/head
Zaidhaan 2023-02-25 04:39:45 +08:00 zatwierdzone przez GitHub
rodzic 958f5967b9
commit 8c783204d3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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>