diff --git a/src/components/poll.jsx b/src/components/poll.jsx index ad1ba118..27090c3b 100644 --- a/src/components/poll.jsx +++ b/src/components/poll.jsx @@ -196,44 +196,43 @@ export default function Poll({ )} )} - {!readOnly && ( -
- {!expired && ( - <> - { - e.preventDefault(); - setUIState('loading'); + + {!expired && !readOnly && ( + <> + { + e.preventDefault(); + setUIState('loading'); - (async () => { - await refresh(); - setUIState('default'); - })(); - }} - > - Refresh - {' '} - •{' '} - > - )} - {shortenNumber(votesCount)} vote - {votesCount === 1 ? '' : 's'} - {!!votersCount && votersCount !== votesCount && ( - <> - {' '} - •{' '} - {shortenNumber(votersCount)}{' '} - voter - {votersCount === 1 ? '' : 's'} - > - )}{' '} - • {expired ? 'Ended' : 'Ending'}{' '} - {!!expiresAtDate && } - - )} + (async () => { + await refresh(); + setUIState('default'); + })(); + }} + > + Refresh + {' '} + •{' '} + > + )} + {shortenNumber(votesCount)} vote + {votesCount === 1 ? '' : 's'} + {!!votersCount && votersCount !== votesCount && ( + <> + {' '} + • + {shortenNumber(votersCount)} + {' '} + voter + {votersCount === 1 ? '' : 's'} + > + )}{' '} + • {expired ? 'Ended' : 'Ending'}{' '} + {!!expiresAtDate && } +
+ {!expired && !readOnly && ( + <> + { + e.preventDefault(); + setUIState('loading'); - (async () => { - await refresh(); - setUIState('default'); - })(); - }} - > - Refresh - {' '} - •{' '} - > - )} - {shortenNumber(votesCount)} vote - {votesCount === 1 ? '' : 's'} - {!!votersCount && votersCount !== votesCount && ( - <> - {' '} - •{' '} - {shortenNumber(votersCount)}{' '} - voter - {votersCount === 1 ? '' : 's'} - > - )}{' '} - • {expired ? 'Ended' : 'Ending'}{' '} - {!!expiresAtDate && } -