Change primary alert message, expiration date, update intl and tests (#1584)

* Change primary alert message, expiration date, update intl and tests
* Update Request for Info box on Contact page
This commit is contained in:
TomNUSDS 2022-04-25 11:57:00 -07:00 committed by GitHub
commit 0cdc44aaab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 367 additions and 47 deletions

View file

@ -1,7 +1,7 @@
/* eslint-disable max-len */
/* eslint-disable react/display-name */
import React from 'react';
import {FormattedMessage} from 'gatsby-plugin-intl';
import {FormattedDate, FormattedMessage} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import LinkTypeWrapper from '../../components/LinkTypeWrapper';
@ -37,21 +37,28 @@ export const BETA_BANNER = 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
export const ALERTS = {
CENSUS_TRACT: defineMessages({
ALERT_1_TITLE: defineMessages({
TITLE: {
id: 'common.pages.alerts.census.tract.title',
defaultMessage: 'Improvements to the map on the Explore the tool page',
description: 'Navigate to any page. This the title of the alert that informs the user that new census tract information is available',
id: 'common.pages.alerts.public_comment_period.title',
defaultMessage: 'Public comment period extended',
description: 'Alert title that appears on landing page.',
},
}),
EXPIRATION_DATE: new Date(2022, 3, 15), // Set expiration for Apr 15th 2022.
CENSUS_TRACT_DESCRIPTION: <FormattedMessage
id={'common.pages.alerts.census.tract.description'}
defaultMessage={`View improvements made to the display of the information for each census tract and <link1>send feedback</link1>.`}
description={`Navigate to any page. This the title of the alert that informs the user that new census tract information is available`}
EXPIRATION_DATE: ALERT_1_EXPIRATION_DATE,
ALERT_1_DESCRIPTION: <FormattedMessage
id={'common.pages.alerts.public_comment_period.description'}
defaultMessage={`The public comment period for <link1>sending feedback</link1> has been extended to {expDate1}.`}
description={`Alert body that appears on landing page.`}
values={{
link1: linkFn(`mailto:${FEEDBACK_EMAIL}`, false, true),
link1: linkFn('https://www.federalregister.gov/documents/2022/04/25/2022-08774/climate-and-economic-justice-screening-tool-beta-version', false, true),
expDate1: <FormattedDate
value={ALERT_1_EXPIRATION_DATE}
year="numeric"
month="short"
day="numeric"
/>,
}}
/>,
};