j40-cejst-2/client/src/components/SurveyButton/SurveyButton.tsx
Vim 1293a52b18
Change Explore the tool to Explore the map (#1552)
* Change Explore the tool to Explore the map

- update all snapshots
- update gherkin tests
- new en.json is created

* Update Alert copy

- update expiration date

* Update es.json ids from tool to map

* Commit latest es.json with local changes

* Rebase main, remove intl errors in console

- change from map to tool in side panel (3 places)
- make survey button route to spanish site
- make survey button open in new tab
- remove all intl errors in console on each page
- remove rebase artifact from es.json
- update all snapshots

* Correct wasterwater typo
2022-05-10 17:23:23 -07:00

34 lines
1,021 B
TypeScript

import React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {Button} from '@trussworks/react-uswds';
import * as styles from './SurveyButton.module.scss';
import * as CONTACT_COPY from '../../data/copy/contact';
import J40MainGridContainer from '../J40MainGridContainer';
// @ts-ignore
import launchIcon from '/node_modules/uswds/dist/img/usa-icons/launch.svg';
const SurveyButton = () => {
const intl = useIntl();
const href = intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_URL);
return (
<J40MainGridContainer className={styles.surveyButtonContainer}>
<a href={href} target='_blank' rel="noreferrer">
<Button
type="button"
className={styles.surveyButton}>
{intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_TEXT)}
<img
className={styles.launchIcon}
src={launchIcon}
alt={'launch icon'}
/>
</Button>
</a>
</J40MainGridContainer>
);
};
export default SurveyButton;