Temporarily removing the use of useStaticQuery as it seems to have introduced a bug in page rendering. Hard-coding for now; incidentally we will need to load this as a string anyway for localization purposes (#70)

This commit is contained in:
Nat Hillard 2021-05-21 10:57:20 -04:00 committed by GitHub
parent a587482967
commit 5c3a3c022a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1571 additions and 1096 deletions

View file

@ -15,10 +15,7 @@ exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
use: loaders.null(), use: loaders.null(),
}, },
], ],
}, }
resolve: {
modules: [path.resolve(__dirname, "src"), "node_modules"],
},
}) })
} }
} }

2647
client/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,28 +1,17 @@
import React from 'react'; import React from 'react';
import { GovBanner, Header, Title, PrimaryNav } from '@trussworks/react-uswds'; import { GovBanner, Header, Title, PrimaryNav } from '@trussworks/react-uswds';
import { useStaticQuery, graphql, Link } from "gatsby"; import { Link } from "gatsby";
const headerLinks = [ const headerLinks = [
<Link to="/">Home</Link> <Link to="/">Home</Link>
]; ];
const J40Header = () => { const J40Header = () => {
const data: any = useStaticQuery(graphql`
query MyQuery {
site {
siteMetadata {
title
}
}
}
`)
const siteTitle: string = data.site.siteMetadata?.title || `Title`
return ( return (
<> <>
<GovBanner /> <GovBanner />
<Header> <Header>
<Title>{siteTitle}</Title> <Title>Justice 40</Title>
<PrimaryNav items={headerLinks}/> <PrimaryNav items={headerLinks}/>
</Header> </Header>
</> </>