Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix case sensitivity on file names and imports as per this github iss…
…ue: gatsbyjs/gatsby#8205
- Loading branch information
Showing
4 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { useStaticQuery, graphql } from "gatsby"; | ||
import styled from 'styled-components'; | ||
import Header from './Header'; | ||
|
||
const MainContentContainer = styled.div` | ||
margin: 0 auto; | ||
margin-bottom: 3rem; | ||
max-width: 960; | ||
padding: 0px 1rem 1.5rem; | ||
min-height: 75vh; | ||
`; | ||
|
||
const PageLayout = ({ children }) => { | ||
const data = useStaticQuery(graphql` | ||
query SiteTitleQuery { | ||
site { | ||
siteMetadata { | ||
title | ||
} | ||
} | ||
} | ||
`); | ||
|
||
return ( | ||
<> | ||
<Header siteTitle={data.site.siteMetadata.title} /> | ||
<MainContentContainer> | ||
<main>{children}</main> | ||
</MainContentContainer> | ||
</> | ||
); | ||
}; | ||
|
||
PageLayout.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
}; | ||
|
||
export default PageLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import React from "react"; | ||
|
||
import Layout from "../components/layout"; | ||
import PageLayout from "../components/PageLayout"; | ||
import SEO from "../components/seo"; | ||
|
||
const NotFoundPage = () => ( | ||
<Layout> | ||
<PageLayout> | ||
<SEO title="404: Not found" /> | ||
<h1>NOT FOUND</h1> | ||
<p>You just hit a route that doesn't exist... the sadness.</p> | ||
</Layout> | ||
</PageLayout> | ||
); | ||
|
||
export default NotFoundPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import React from "react"; | ||
import { Link } from "gatsby"; | ||
import Layout from "../components/layout"; | ||
import PageLayout from "../components/PageLayout"; | ||
import SEO from "../components/seo"; | ||
|
||
const IndexPage = () => ( | ||
<Layout> | ||
<PageLayout> | ||
<SEO title="Home" /> | ||
<h1>🤔 I'm not sure how you got here, but click the link below to begin.</h1> | ||
<Link to="/what-are-hooks/">Go to page 2</Link> | ||
</Layout> | ||
</PageLayout> | ||
); | ||
|
||
export default IndexPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters