From ddf58313d6c71d51e9ae2bce3a980f44c80ff02a Mon Sep 17 00:00:00 2001 From: rkzel Date: Sat, 17 Aug 2019 21:01:32 +0200 Subject: [PATCH] not all votes have balance. this code is on rinkeby now. --- apps/dot-voting/app/components/ProgressBarThick.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/dot-voting/app/components/ProgressBarThick.js b/apps/dot-voting/app/components/ProgressBarThick.js index 0a4fce2b2..8a6c87da5 100644 --- a/apps/dot-voting/app/components/ProgressBarThick.js +++ b/apps/dot-voting/app/components/ProgressBarThick.js @@ -20,7 +20,15 @@ const ProgressBar = ({ progress, label, hasBalance = false, balanceSplit = '' }) color={theme.textSecondary} style={{ paddingRight: '4px', textAlign: 'right' }} > - {balanceSplit} • {Math.round(progress * 100)}% + {hasBalance ? ( + + {balanceSplit} • {Math.round(progress * 100)}% + + ) : ( + + {Math.round(progress * 100)}% + + )} )}