diff --git a/app/soapbox/components/poll.js b/app/soapbox/components/poll.js index d0498af2a..866182ca4 100644 --- a/app/soapbox/components/poll.js +++ b/app/soapbox/components/poll.js @@ -84,11 +84,10 @@ class Poll extends ImmutablePureComponent { renderOption(option, optionIndex, showResults) { const { poll, disabled, intl } = this.props; - const pollVotesCount = poll.get('voters_count') || poll.get('votes_count'); - const percent = pollVotesCount === 0 ? 0 : (option.get('votes_count') / pollVotesCount) * 100; - const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') >= other.get('votes_count')); - const active = !!this.state.selected[`${optionIndex}`]; - const voted = option.get('voted') || (poll.get('own_votes') && poll.get('own_votes').includes(optionIndex)); + const percent = poll.get('votes_count') === 0 ? 0 : (option.get('votes_count') / poll.get('votes_count')) * 100; + const leading = poll.get('options').filterNot(other => other.get('title') === option.get('title')).every(other => option.get('votes_count') >= other.get('votes_count')); + const active = !!this.state.selected[`${optionIndex}`]; + const voted = option.get('voted') || (poll.get('own_votes') && poll.get('own_votes').includes(optionIndex)); let titleEmojified = option.get('title_emojified'); if (!titleEmojified) { @@ -150,14 +149,6 @@ class Poll extends ImmutablePureComponent { const disabled = this.props.disabled || Object.entries(this.state.selected).every(item => !item); const voted = poll.get('own_votes').size > 0; - let votesCount = null; - - if (poll.get('voters_count') !== null && poll.get('voters_count') !== undefined) { - votesCount = ; - } else { - votesCount = ; - } - return (
    @@ -167,7 +158,7 @@ class Poll extends ImmutablePureComponent {
    {!showResults && } {showResults && !this.props.disabled && · } - {votesCount} + {poll.get('expires_at') && · {timeRemaining}}