mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-08 15:54:19 -07:00
Spanish survey support (#1589)
* Spanish site improvements * surveybutton localization * Basic ES support. Localization done, too. * Update test snapshots. Co-authored-by: Jorge Escobar <jorge.e.escobar@omb.eop.gov>
This commit is contained in:
parent
5b4f4af2a7
commit
5b5d6051a8
17 changed files with 167 additions and 123 deletions
|
@ -9,26 +9,24 @@ import J40MainGridContainer from '../J40MainGridContainer';
|
|||
// @ts-ignore
|
||||
import launchIcon from '/node_modules/uswds/dist/img/usa-icons/launch.svg';
|
||||
|
||||
export const onClickHandler = () => {
|
||||
Object.assign(document.createElement('a'), {target: '_blank', href: 'https://www.surveymonkey.com/r/cejst-survey'}).click();
|
||||
};
|
||||
|
||||
const SurveyButton = () => {
|
||||
const intl = useIntl();
|
||||
const href = intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_URL);
|
||||
|
||||
return (
|
||||
<J40MainGridContainer className={styles.surveyButtonContainer}>
|
||||
<Button
|
||||
type='button'
|
||||
className={styles.surveyButton}
|
||||
onClick={() => onClickHandler()}>
|
||||
{intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_TEXT)}
|
||||
<img
|
||||
className={styles.launchIcon}
|
||||
src={launchIcon}
|
||||
alt={'launch icon'}
|
||||
/>
|
||||
</Button>
|
||||
<a href={href}>
|
||||
<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>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue