From f248438e7442e96cd50d3b29ba4783d0e1e88c10 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Sun, 1 Jul 2018 13:46:25 -0400 Subject: [PATCH] add a disabled vote message --- app/components/simple-voting/PollsList.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/components/simple-voting/PollsList.js b/app/components/simple-voting/PollsList.js index a780429..be2c687 100644 --- a/app/components/simple-voting/PollsList.js +++ b/app/components/simple-voting/PollsList.js @@ -116,7 +116,6 @@ class Poll extends PureComponent { const { fromWei } = web3.utils; const maxValue = Math.floor(Math.sqrt(balance)); const buttonText = originalValue != 0 && value != originalValue ? 'Change Vote' : 'Vote'; - console.log(classes) return ( @@ -127,11 +126,15 @@ class Poll extends PureComponent { Your vote: {value} votes ({value * value} SNT) + {disableVote && + {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 && {isSubmitting ? : } - + } ) }