From 1e6af2a7610660afeeec2ae5b221cd777b694e44 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sat, 11 Jul 2020 15:38:29 +0200 Subject: [PATCH] Remove any poll defaults (needs selection) (#3167) --- packages/page-poll/src/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/page-poll/src/index.tsx b/packages/page-poll/src/index.tsx index 4e5bac9d8f..1b56f7638d 100644 --- a/packages/page-poll/src/index.tsx +++ b/packages/page-poll/src/index.tsx @@ -27,7 +27,7 @@ function PollApp ({ className }: Props): React.ReactElement { const totals = useCall>(api.query.poll.totals, []); const bestNumber = useCall(api.derive.chain.bestNumber, []); const [accountId, setAccountId] = useState(null); - const [opt10m, setOpt10m] = useState(true); + const [opt10m, setOpt10m] = useState(false); const [opt100m, setOpt100m] = useState(false); const [opt1b, setOpt1b] = useState(false); const [opt10b, setOpt10b] = useState(false); @@ -53,6 +53,7 @@ function PollApp ({ className }: Props): React.ReactElement { [t('1 billion DOTs; 10 decimals'), opt1b, setOpt1b], [t('10 billion DOTs; 9 decimals'), opt10b, setOpt10b] ]; + const hasValue = opt10m || opt100m || opt1b || opt10b; return (
@@ -72,8 +73,8 @@ function PollApp ({ className }: Props): React.ReactElement { label={ canVote ? value - ? t('Aye, I can support this') - : t('Nay, I cannot support this') + ? t('Aye, I support this') + : t('Nay, I do not support this') : t('Voting closed') } onChange={onChange} @@ -108,6 +109,7 @@ function PollApp ({ className }: Props): React.ReactElement {