From 8001fb5fde3802a8a0b1c0ffcd76a96139340a14 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 23 Aug 2020 19:52:45 +0200 Subject: [PATCH] Move tooltip for aye/nay (#3491) --- .../src/Overview/ReferendumVotes.tsx | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/packages/page-democracy/src/Overview/ReferendumVotes.tsx b/packages/page-democracy/src/Overview/ReferendumVotes.tsx index 6d209e48ec..abfad83923 100644 --- a/packages/page-democracy/src/Overview/ReferendumVotes.tsx +++ b/packages/page-democracy/src/Overview/ReferendumVotes.tsx @@ -42,46 +42,40 @@ function ReferendumVotes ({ change, className, count, index, isAye, isWinning, t [votes] ); - if (!count) { - return null; - } - return ( {isAye - ? t('Aye {{count}}', { replace: { count: ` (${formatNumber(count)})` } }) - : t('Nay {{count}}', { replace: { count: ` (${formatNumber(count)})` } }) - } -
- - } - summarySub={ -
- {change.gtn(0) && ( -
+ ? t('Aye {{count}}', { replace: { count: count ? ` (${formatNumber(count)})` : '' } }) + : t('Nay {{count}}', { replace: { count: count ? ` (${formatNumber(count)})` : '' } }) + }{change.gtn(0) && ( + <> + {' '} - ('The amount this total can be reduced by to change the referendum outcome. This assumes changes to the convictions of the existing votes, with no additional turnout.') - : t('The amount this total should be increased by to change the referendum outcome. This assumes additional turnout with new votes at 1x conviction.') + <> + +

{isWinning + ? t('The amount this total can be reduced by to change the referendum outcome. This assumes changes to the convictions of the existing votes, with no additional turnout.') + : t('The amount this total should be increased by to change the referendum outcome. This assumes additional turnout with new votes at 1x conviction.') + }

+ } trigger={trigger} /> -
+ )} -
+
+ +
+ } > {sorted.map((vote) =>