Adds dataset cards to Methodology page (#442)

* intial cards for methodology page

* PR and QA feedback
- adds alert above dataset section
- adds intl
- removes nbsp
- creates directory structure for new components

* revert noUsedLocals flag

* fixed path error

* re-creates scss file to test build failure

* renaming file to troubleshoot build error

* links open in new tabs and removes console.log

* removes units on all scss value that equal 0

* resolving merge conflicts from header merge

* updates snapshots from conflict resolution
This commit is contained in:
Vim 2021-08-02 08:49:49 -07:00 committed by GitHub
commit 51f7666062
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 688 additions and 36 deletions

View file

@ -3,8 +3,8 @@ import {GridContainer, Grid} from '@trussworks/react-uswds';
import J40Header from './J40Header';
import J40Footer from './J40Footer';
import {URLFlagProvider} from '../contexts/FlagContext';
import {Helmet} from 'react-helmet';
import {useIntl} from 'gatsby-plugin-intl';
import DatasetContainer from '../components/DatasetContainer';
// this has to be wrong
interface ILayoutProps {
children: ReactNode,
@ -12,16 +12,12 @@ interface ILayoutProps {
}
const Layout = ({children, location}: ILayoutProps) => {
const intl = useIntl();
const isMethodologyPage = location.pathname.match(/methodology\/?/);
// @ts-ignore
return (
<URLFlagProvider location={location}>
<Helmet htmlAttributes={{lang: intl.locale}}>
<meta charSet="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</Helmet>
<J40Header/>
<J40Header location={location}/>
<GridContainer containerSize={'desktop-lg'}
className={'j40-grid-container'}>
<Grid row>
@ -31,6 +27,7 @@ const Layout = ({children, location}: ILayoutProps) => {
</main>
</Grid>
</GridContainer>
{isMethodologyPage ? <DatasetContainer />: null}
<J40Footer/>
</URLFlagProvider>
);