From b5199c17e226f9b394158957d83e6a0078d8e9d8 Mon Sep 17 00:00:00 2001 From: cbrianbet Date: Thu, 14 Dec 2023 11:39:15 +0300 Subject: [PATCH] change spelling errors --- src/views/CT/ViralLoad/ViralLoad.js | 2 +- src/views/CT/ViralLoad/ViralLoadU_U.js | 2 +- src/views/Home/HomeVLCascade.js | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/views/CT/ViralLoad/ViralLoad.js b/src/views/CT/ViralLoad/ViralLoad.js index 804c2abe..3695862a 100644 --- a/src/views/CT/ViralLoad/ViralLoad.js +++ b/src/views/CT/ViralLoad/ViralLoad.js @@ -126,7 +126,7 @@ const ViralLoad = () => { toggle('undetectable_untransmittable'); }} > - {`UNDETECTABLE=UNTRAMITTABLE (U=U)`} + {`UNDETECTABLE=UNTRANSMITTABLE (U=U)`} diff --git a/src/views/CT/ViralLoad/ViralLoadU_U.js b/src/views/CT/ViralLoad/ViralLoadU_U.js index bf29b23e..b9c7cde3 100644 --- a/src/views/CT/ViralLoad/ViralLoadU_U.js +++ b/src/views/CT/ViralLoad/ViralLoadU_U.js @@ -14,7 +14,7 @@ const ViralLoadU_U = () => { return ( <> - + { // const currentOnArt = useSelector( // currentOnArtOverviewSelectors.getCurrentOnArt // ); - + const currentDate = moment(); + + // Check if the current date is before the 20th of the month + if (currentDate.date() < 20) { + // If true, subtract 2 months + currentDate.subtract(2, 'months'); + } else { + // If false, subtract 1 month + currentDate.subtract(1, 'months'); + } + // Format the date + const reporting_month = currentDate.format('MMM YYYY'); + const currentOnArt = useSelector(currentOnArtSelectors.getCurrentOnArt); - const currentOnArtText = - 'CURRENT ON ART as at ' + - moment().subtract(2, 'month').add(20, 'days').format('MMM YYYY'); + const currentOnArtText = 'CURRENT ON ART as at ' + reporting_month; const eligibleForVl = useSelector( currentOnArtOverviewSelectors.getEligibleForVl );