diff --git a/src/components/voteUrlProcessor/index.js b/src/components/voteUrlProcessor/index.js index b2805f6bb..9faefe633 100644 --- a/src/components/voteUrlProcessor/index.js +++ b/src/components/voteUrlProcessor/index.js @@ -17,7 +17,8 @@ const filterObjectPropsWithValue = (object = {}, value) => ( const mapStateToProps = state => ({ votes: state.voting.votes, - voteCount: Object.keys(state.voting.voteLookupStatus || {}).length, + urlVoteCount: Object.keys(state.voting.voteLookupStatus || {}).length, + pending: filterObjectPropsWithValue(state.voting.voteLookupStatus, 'pending'), downvotes: filterObjectPropsWithValue(state.voting.voteLookupStatus, 'downvotes'), upvotes: filterObjectPropsWithValue(state.voting.voteLookupStatus, 'upvotes'), alreadyVoted: filterObjectPropsWithValue(state.voting.voteLookupStatus, 'alreadyVoted'), diff --git a/src/components/voteUrlProcessor/voteUrlProcessor.js b/src/components/voteUrlProcessor/voteUrlProcessor.js index d15120739..9b8d94c7e 100644 --- a/src/components/voteUrlProcessor/voteUrlProcessor.js +++ b/src/components/voteUrlProcessor/voteUrlProcessor.js @@ -22,11 +22,7 @@ export default class VoteUrlProcessor extends React.Component { } getProccessedCount() { - return this.props.upvotes.length + - this.props.downvotes.length + - this.props.notFound.length + - this.props.notVotedYet.length + - this.props.alreadyVoted.length; + return this.props.urlVoteCount - this.props.pending.length; } render() { @@ -46,13 +42,13 @@ export default class VoteUrlProcessor extends React.Component { }; return (
- {this.getProccessedCount() < this.props.voteCount ? + {this.getProccessedCount() < this.props.urlVoteCount ? (
+ value={this.getProccessedCount()} max={this.props.urlVoteCount}/>
{this.props.t('Processing delegate names: ')} - {this.getProccessedCount()} / {this.props.voteCount} + {this.getProccessedCount()} / {this.props.urlVoteCount}
) : ({Object.keys(errorMessages).map(list => (