feat: set up new homepage using new branding

This commit is contained in:
Jean-Philippe Sirois
2019-08-23 17:00:15 -04:00
parent 59f83e3dd0
commit 0af9faf322
14 changed files with 302 additions and 60 deletions
+14 -8
View File
@@ -14,7 +14,11 @@ import { Footer } from "../Footer"
import { Header } from "../Header"
import * as SC from "./styles"
export function Layout({ children }: PropsWithChildren<{}>) {
export function Layout({
children,
location,
}: PropsWithChildren<{ location: Location }>) {
const isHome = location.pathname === "/"
const data = useStaticQuery(graphql`
query {
site {
@@ -29,13 +33,15 @@ export function Layout({ children }: PropsWithChildren<{}>) {
<SC.LayoutWrapper>
<GlobalStyles />
<Header />
<SC.MainContent>
<Container>
<h1>{data.site.siteMetadata.title}</h1>
{children}
</Container>
</SC.MainContent>
<Footer />
{!isHome && (
<SC.MainContent>
<Container>
<h1>{data.site.siteMetadata.title}</h1>
{children}
</Container>
</SC.MainContent>
)}
{!isHome && <Footer />}
</SC.LayoutWrapper>
)
}