From ef46af00f89f8ad6c6624526b9fb3f4c18b5b970 Mon Sep 17 00:00:00 2001 From: Vim <86254807+vim-usds@users.noreply.github.com> Date: Wed, 25 May 2022 12:10:14 -0400 Subject: [PATCH] Add time to expiration date (#1654) * Push out expiration by a day for fast fix * Add timestampt to expiration - update snapshots * Remove timed alerts --- client/src/components/J40Header/J40Header.tsx | 4 +--- .../src/components/RequestForInfo/RequestForInfo.tsx | 3 +-- client/src/data/copy/common.tsx | 2 +- .../pages/tests/__snapshots__/publicEng.test.tsx.snap | 11 ++--------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/client/src/components/J40Header/J40Header.tsx b/client/src/components/J40Header/J40Header.tsx index 69d3ddd5..011e127b 100644 --- a/client/src/components/J40Header/J40Header.tsx +++ b/client/src/components/J40Header/J40Header.tsx @@ -20,8 +20,6 @@ import * as styles from './J40Header.module.scss'; import * as COMMON_COPY from '../../data/copy/common'; import {PAGES_ENDPOINTS} from '../../data/constants'; -const isAlertValid = new Date < COMMON_COPY.ALERTS.EXPIRATION_DATE; - const J40Header = () => { const intl = useIntl(); @@ -232,7 +230,7 @@ const J40Header = () => { {/* Alert */} - {isAlertValid && + { { const intl = useIntl(); - const commentPeriodExpired = new Date < COMMON_COPY.ALERTS.EXPIRATION_DATE; return (

{CONTACT_COPY.RFI_BOX_BODY}

-

{commentPeriodExpired && COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}

+

{COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}

); }; diff --git a/client/src/data/copy/common.tsx b/client/src/data/copy/common.tsx index 0a8f63e8..48b8703f 100644 --- a/client/src/data/copy/common.tsx +++ b/client/src/data/copy/common.tsx @@ -51,7 +51,7 @@ export const TSD = defineMessages({ // Alerts // Expiration month is zero-based: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth -const ALERT_1_EXPIRATION_DATE= new Date(2022, 4, 25); // May 25 +const ALERT_1_EXPIRATION_DATE= new Date(2022, 4, 25, 11, 59, 59); // May 25 export const ALERTS = { ALERT_1_TITLE: defineMessages({ TITLE: { diff --git a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap index f58948a2..7b4befd6 100644 --- a/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap +++ b/client/src/pages/tests/__snapshots__/publicEng.test.tsx.snap @@ -448,15 +448,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

- - CEJST listening session #4 - + CEJST listening session #4

Registration link