mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-29 07:51:16 -07:00
* Header updates * More pixel alignment for nav * Update unit test snapshots I removed a stray `,` from `testHelpers.tsx` which changed the output of several snapshots. * Fixes from PR review * Forgot to update snapshots after merge with main * Removed unused (and outdated) timeline page * Updated some translation descriptions.
This commit is contained in:
parent
8df548f506
commit
08e21e5d5b
12 changed files with 299 additions and 27282 deletions
|
@ -2,9 +2,9 @@ import React, {ReactNode} from 'react';
|
|||
import {GridContainer, Grid} from '@trussworks/react-uswds';
|
||||
import J40Header from './J40Header';
|
||||
import J40Footer from './J40Footer';
|
||||
import J40Aside from '../components/J40Aside';
|
||||
import {URLFlagProvider} from '../contexts/FlagContext';
|
||||
// this has to be wrong
|
||||
import {Helmet} from 'react-helmet';
|
||||
import {useIntl} from 'gatsby-plugin-intl';
|
||||
|
||||
interface ILayoutProps {
|
||||
children: ReactNode,
|
||||
|
@ -12,23 +12,23 @@ interface ILayoutProps {
|
|||
}
|
||||
|
||||
const Layout = ({children, location}: ILayoutProps) => {
|
||||
const isWidthFullPage = location.pathname.match(/cejst\/?/);
|
||||
const conditionalAside = isWidthFullPage ? <></> : <J40Aside/>;
|
||||
const gridCssClass = isWidthFullPage ? ' desktop:grid-col-12' :
|
||||
'desktop:grid-col-9';
|
||||
const intl = useIntl();
|
||||
|
||||
// @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/>
|
||||
<GridContainer containerSize={'desktop-lg'}
|
||||
className={'j40-grid-container'}>
|
||||
<Grid row>
|
||||
<main id={'main-content'}
|
||||
className={'usa-layout-docs j40-main-content ' + gridCssClass}>
|
||||
className={'usa-layout-docs j40-main-content desktop:grid-col-12'}>
|
||||
{children}
|
||||
</main>
|
||||
{conditionalAside}
|
||||
</Grid>
|
||||
</GridContainer>
|
||||
<J40Footer/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue