From 0848bbe54e3fbdd6e6e15a171a5d5ce3d3a1d980 Mon Sep 17 00:00:00 2001 From: Mike Joyce Date: Thu, 6 Feb 2020 13:11:57 -0500 Subject: [PATCH] Fix wording for homepage position count --- src/Components/HomePageBanner/HomePageBanner.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Components/HomePageBanner/HomePageBanner.jsx b/src/Components/HomePageBanner/HomePageBanner.jsx index 56f24af511..fbfa675a57 100644 --- a/src/Components/HomePageBanner/HomePageBanner.jsx +++ b/src/Components/HomePageBanner/HomePageBanner.jsx @@ -31,6 +31,9 @@ class HomePageBanner extends Component { // Subtract the count by 6 to ensure that it will always be rounded down to the nearest 10 (-1) const shouldRound = positionCount > 50; const roundedCount = shouldRound ? round(positionCount - 6, -1) : positionCount; + let preText = shouldRound ? 'There are more than' : 'There are'; + if (positionCount === 1) { preText = 'There is'; } + const positionTextPlural = positionCount === 1 ? 'position' : 'positions'; return (
@@ -52,7 +55,7 @@ class HomePageBanner extends Component { !roundedCount && !isLoading ? null : - There are more than  + {preText}  { isLoading ? @@ -63,7 +66,7 @@ class HomePageBanner extends Component { )} } -  positions available for bidding. +  {positionTextPlural} available for bidding. }