fix page template
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user