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

View File

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

View File

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