|
1 | 1 | import { type HeadFC, Link, type PageProps } from "gatsby";
|
2 |
| -import type * as React from "react"; |
3 |
| - |
4 |
| -const pageStyles = { |
5 |
| - color: "#232129", |
6 |
| - padding: "96px", |
7 |
| - fontFamily: "-apple-system, Roboto, sans-serif, serif", |
8 |
| -}; |
9 |
| -const headingStyles = { |
10 |
| - marginTop: 0, |
11 |
| - marginBottom: 64, |
12 |
| - maxWidth: 320, |
13 |
| -}; |
14 |
| - |
15 |
| -const paragraphStyles = { |
16 |
| - marginBottom: 48, |
17 |
| -}; |
18 |
| -const codeStyles = { |
19 |
| - color: "#8A6534", |
20 |
| - padding: 4, |
21 |
| - backgroundColor: "#FFF4DB", |
22 |
| - fontSize: "1.25rem", |
23 |
| - borderRadius: 4, |
24 |
| -}; |
| 2 | +import { Heading, Page, PageContent, Paragraph } from "grommet"; |
| 3 | +import { Layout } from "../components/layout"; |
| 4 | +import { Seo } from "../components/seo"; |
25 | 5 |
|
26 | 6 | const NotFoundPage: React.FC<PageProps> = () => {
|
27 | 7 | return (
|
28 |
| - <main style={pageStyles}> |
29 |
| - <h1 style={headingStyles}>Page not found</h1> |
30 |
| - <p style={paragraphStyles}> |
31 |
| - Sorry 😔, we couldn’t find what you were looking for. |
32 |
| - <br /> |
33 |
| - {process.env.NODE_ENV === "development" ? ( |
34 |
| - <> |
35 |
| - <br /> |
36 |
| - Try creating a page in <code style={codeStyles}>src/pages/</code>. |
37 |
| - <br /> |
38 |
| - </> |
39 |
| - ) : null} |
40 |
| - <br /> |
41 |
| - <Link to="/">Go home</Link>. |
42 |
| - </p> |
43 |
| - </main> |
| 8 | + <Layout> |
| 9 | + <Page kind="narrow" margin={{ vertical: "xlarge" }}> |
| 10 | + <PageContent> |
| 11 | + <Heading level="1" margin="none"> |
| 12 | + Page not found |
| 13 | + </Heading> |
| 14 | + <Paragraph size="large" fill> |
| 15 | + Sorry 😔, we couldn’t find what you were looking for.{" "} |
| 16 | + <Link to="/">Go home</Link>. |
| 17 | + </Paragraph> |
| 18 | + </PageContent> |
| 19 | + </Page> |
| 20 | + </Layout> |
44 | 21 | );
|
45 | 22 | };
|
46 | 23 |
|
47 | 24 | export default NotFoundPage;
|
48 | 25 |
|
49 |
| -export const Head: HeadFC = () => <title>Not found</title>; |
| 26 | +export const Head: HeadFC = () => <Seo title="Not Found" />; |
0 commit comments