fix page template

This commit is contained in:
2020-09-24 09:12:57 -05:00
parent 056bb8eb8a
commit f8842bd7c7
3 changed files with 9 additions and 8 deletions

View File

@@ -1,10 +1,9 @@
import React from "react"; import React from "react";
import Layout from "../components/layout" import Page from "../templates/page";
export default function NotFound() { export default function NotFound() {
return ( return (
<Layout> <Page title="404 : Page not found">
<h1>404 : Page not found</h1>
<p> <p>
Sorry, we've misplaced that URL or it's pointing Sorry, we've misplaced that URL or it's pointing
to something that doesn't exist. to something that doesn't exist.
@@ -12,6 +11,6 @@ export default function NotFound() {
<p> <p>
<a href="/">Head back home</a> to try finding it again. <a href="/">Head back home</a> to try finding it again.
</p> </p>
</Layout> </Page>
) )
} }

View File

@@ -3,8 +3,10 @@ import Page from "../templates/page";
export default function Home() { export default function Home() {
return ( return (
<Page> <Page title="home page">
<div>hello world!</div> <div>
this is the home page
</div>
</Page> </Page>
); );
} }

View File

@@ -1,11 +1,11 @@
import React from "react"; import React from "react";
import Layout from "../components/layout" import Layout from "../components/layout"
export default function Page({ children }) { export default function Page({ title, children }) {
return ( return (
<Layout> <Layout>
<article className="page"> <article className="page">
<h1 className="page-title">page.title</h1> <h1 className="page-title">{title}</h1>
{children} {children}
</article> </article>
</Layout> </Layout>