mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-12 07:14:19 -07:00
- fix all cypress tests - refactor all test to use LegacyTests/constants/PAGES_ENDPOINTS - gatsby-config to use PAGES_ENDPOINTS - remove ScoreStepList component - update J40Header to use constants.PAGES_ENDPOINTS - update snapshots - there are 3 locations to update PAGES_ENDPOINTS, namely 1. LegacyTests/constants.tsx 2. constants.tsx 3. gatsby-config
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
import React from 'react';
|
|
import {Link, useIntl} from 'gatsby-plugin-intl';
|
|
import {Grid} from '@trussworks/react-uswds';
|
|
|
|
import DatasetCard from '../DatasetCard';
|
|
import J40MainGridContainer from '../J40MainGridContainer';
|
|
import {hyphenizeString} from '../../../cypress/integration/common/helpers';
|
|
|
|
import * as styles from './dsContainer.module.scss';
|
|
import * as METHODOLOGY_COPY from '../../data/copy/methodology';
|
|
import {PAGES_ENDPOINTS} from '../../data/constants';
|
|
|
|
|
|
const DatasetContainer = () => {
|
|
const intl = useIntl();
|
|
|
|
return (
|
|
<>
|
|
<J40MainGridContainer fullWidth={true} blueBackground={false}>
|
|
<J40MainGridContainer
|
|
dataCy={`${hyphenizeString(METHODOLOGY_COPY.DATASETS.HEADING.defaultMessage)}-block`}>
|
|
|
|
<Grid row>
|
|
<Grid col={12}>
|
|
<h2>{intl.formatMessage(METHODOLOGY_COPY.DATASETS.HEADING)}</h2>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid row>
|
|
<Grid desktop={{col: 9}}>
|
|
<p>{intl.formatMessage(METHODOLOGY_COPY.DATASETS.INFO)}</p>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid row>
|
|
<Grid col={12}>
|
|
<div className={styles.datasetCardsContainer}>
|
|
{METHODOLOGY_COPY.INDICATORS.map((card, index) => <DatasetCard
|
|
key={index}
|
|
datasetCardProps={card}
|
|
/>)}
|
|
</div>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<div className={styles.returnToTop}>
|
|
<Link to={PAGES_ENDPOINTS.METHODOLOGY}>
|
|
{METHODOLOGY_COPY.RETURN_TO_TOP.LINK}
|
|
</Link>
|
|
</div>
|
|
|
|
</J40MainGridContainer>
|
|
</J40MainGridContainer>
|
|
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default DatasetContainer;
|