Skip to content

Commit c2a11df

Browse files
committed
create 404 page
1 parent c7049a6 commit c2a11df

File tree

1 file changed

+17
-40
lines changed

1 file changed

+17
-40
lines changed

src/pages/404.tsx

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,26 @@
11
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";
255

266
const NotFoundPage: React.FC<PageProps> = () => {
277
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>
4421
);
4522
};
4623

4724
export default NotFoundPage;
4825

49-
export const Head: HeadFC = () => <title>Not found</title>;
26+
export const Head: HeadFC = () => <Seo title="Not Found" />;

0 commit comments

Comments
 (0)