Add hash to send feedback email (#1551)

- detected bug with zoom/lat/lng values and created ticket 1550
- get realtime has from mapRef
- pass hash to AreaDetail as prop
- update tests and snapshots
This commit is contained in:
Vim 2022-04-12 14:49:57 -04:00 committed by GitHub
commit 1ce124069d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 19 deletions

View file

@ -21,6 +21,7 @@ import mailIcon from '/node_modules/uswds/dist/img/usa-icons/mail_outline.svg';
interface IAreaDetailProps {
properties: constants.J40Properties,
hash: string[],
}
/**
@ -40,7 +41,7 @@ export interface indicatorInfo {
threshold?: number,
}
const AreaDetail = ({properties}:IAreaDetailProps) => {
const AreaDetail = ({properties, hash}:IAreaDetailProps) => {
const intl = useIntl();
// console.log the properties of the census that is selected:
@ -55,7 +56,10 @@ const AreaDetail = ({properties}:IAreaDetailProps) => {
const isCommunityFocus = score >= constants.SCORE_BOUNDARY_THRESHOLD;
const feedbackEmailSubject = `Census tract ID ${blockGroup}, ${countyName}, ${stateName}`;
const feedbackEmailSubject = hash ? `
Census tract ID ${blockGroup}, ${countyName}, ${stateName}, ( z/lat/lon: #${hash.join('/')} )
` : `Census tract ID ${blockGroup}, ${countyName}, ${stateName}`;
const feedbackEmailBody = intl.formatMessage(EXPLORE_COPY.SEND_FEEDBACK.EMAIL_BODY);
/**