From 9603413242c06235e8b247f64867ffd7fd611868 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Sun, 1 Jul 2018 15:46:39 -0400 Subject: [PATCH] fix bug related to spinner not loading --- app/components/simple-voting/PollsList.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/components/simple-voting/PollsList.js b/app/components/simple-voting/PollsList.js index be2c687..4e28ac4 100644 --- a/app/components/simple-voting/PollsList.js +++ b/app/components/simple-voting/PollsList.js @@ -112,7 +112,8 @@ class Poll extends PureComponent { classes } = this.props; const { value, originalValue, isSubmitting } = this.state; - const disableVote = balance == 0 || !_canVote || isSubmitting; + const cantVote = balance == 0 || !_canVote; + const disableVote = cantVote || isSubmitting; const { fromWei } = web3.utils; const maxValue = Math.floor(Math.sqrt(balance)); const buttonText = originalValue != 0 && value != originalValue ? 'Change Vote' : 'Vote'; @@ -126,12 +127,12 @@ class Poll extends PureComponent { Your vote: {value} votes ({value * value} SNT) - {disableVote && + {cantVote && {balance == 0 && You can not vote because your account had no SNT when this poll was created} {balance != 0 && !_canVote && You can not vote on this poll} } - {!disableVote && + {!cantVote && {isSubmitting ? : } }