Add time to expiration date (#1654)

* Push out expiration by a day for fast fix

* Add timestampt to expiration

- update snapshots

* Remove timed alerts
This commit is contained in:
Vim 2022-05-25 12:10:14 -04:00 committed by GitHub
parent c398fe8737
commit ef46af00f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 15 deletions

View file

@ -20,8 +20,6 @@ import * as styles from './J40Header.module.scss';
import * as COMMON_COPY from '../../data/copy/common'; import * as COMMON_COPY from '../../data/copy/common';
import {PAGES_ENDPOINTS} from '../../data/constants'; import {PAGES_ENDPOINTS} from '../../data/constants';
const isAlertValid = new Date < COMMON_COPY.ALERTS.EXPIRATION_DATE;
const J40Header = () => { const J40Header = () => {
const intl = useIntl(); const intl = useIntl();
@ -232,7 +230,7 @@ const J40Header = () => {
</J40MainGridContainer> </J40MainGridContainer>
{/* Alert */} {/* Alert */}
{isAlertValid && <J40MainGridContainer> {<J40MainGridContainer>
<Alert <Alert
className={styles.alert} className={styles.alert}
type="info" type="info"

View file

@ -8,12 +8,11 @@ import * as COMMON_COPY from '../../data/copy/common';
const RequestForInfo = () => { const RequestForInfo = () => {
const intl = useIntl(); const intl = useIntl();
const commentPeriodExpired = new Date < COMMON_COPY.ALERTS.EXPIRATION_DATE;
return ( return (
<SummaryBox className={styles.rfiBox} heading={intl.formatMessage(CONTACT_COPY.RFI_BOX.TITLE)}> <SummaryBox className={styles.rfiBox} heading={intl.formatMessage(CONTACT_COPY.RFI_BOX.TITLE)}>
<p>{CONTACT_COPY.RFI_BOX_BODY}</p> <p>{CONTACT_COPY.RFI_BOX_BODY}</p>
<p>{commentPeriodExpired && COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}</p> <p>{COMMON_COPY.ALERTS.ALERT_1_DESCRIPTION}</p>
</SummaryBox> </SummaryBox>
); );
}; };

View file

@ -51,7 +51,7 @@ export const TSD = defineMessages({
// Alerts // Alerts
// Expiration month is zero-based: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth // 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 = { export const ALERTS = {
ALERT_1_TITLE: defineMessages({ ALERT_1_TITLE: defineMessages({
TITLE: { TITLE: {

View file

@ -448,15 +448,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
<h3 <h3
class="usa-collection__heading" class="usa-collection__heading"
> >
<a CEJST listening session #4
class="usa-link usa-link--external"
data-cy="may-19-reg-link-block"
href="https://pitc.zoomgov.com/webinar/register/WN_1PR73vLDQpq1zoAWkhKB5g"
rel="noreferrer"
target="_blank"
>
CEJST listening session #4
</a>
</h3> </h3>
<p <p
class="usa-collection__description" class="usa-collection__description"
@ -488,6 +480,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
<button <button
class="usa-button" class="usa-button"
data-testid="button" data-testid="button"
disabled=""
type="button" type="button"
> >
Registration link Registration link