Skip to content

Commit 06f916b

Browse files
committed
[UPD] 404 page basic styling + Translation wiring
1 parent 4d6298e commit 06f916b

File tree

2 files changed

+42
-13
lines changed

2 files changed

+42
-13
lines changed

src/pages/404.js

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,43 @@
1-
import * as React from "react"
1+
import * as React from "react";
2+
import { graphql } from 'gatsby';
3+
import { Trans } from "gatsby-plugin-react-i18next";
4+
import Layout from "../components/layout";
5+
import SEO from "../components/seo";
6+
import SiteBorderStyles from "../styles/SiteBorderStyles";
27

3-
import Layout from "../components/layout"
4-
import SEO from "../components/seo"
8+
export default function NotFoundPage() {
9+
return (
10+
<Layout>
11+
<SEO title="404" />
12+
<SiteBorderStyles>
13+
<section>
14+
<div className="text-left md:text-center py-4 md:pt-16 md:pb-8 lg:pt-24 md:pb-8">
15+
<h2 className="text-3xl lg:text-4xl">
16+
<span className="highlight-red">
17+
404
18+
</span>
19+
<Trans> Page Not Found</Trans>
20+
</h2>
21+
<p className="text-xl lg:text-2xl my-4" style={{color: `var(--darkgrey)`}}>
22+
<Trans>You just hit a route that doesn&#39;t exist... the sadness.</Trans>
23+
</p>
24+
</div>
25+
</section>
26+
</SiteBorderStyles>
27+
</Layout>
28+
)
29+
}
530

6-
const NotFoundPage = () => (
7-
<Layout>
8-
<SEO title="404: Not found" />
9-
<h1>404: Not Found</h1>
10-
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
11-
</Layout>
12-
)
13-
14-
export default NotFoundPage
31+
export const query = graphql`
32+
query($language: String!) {
33+
locales: allLocale(filter: {language: {eq: $language}}) {
34+
edges {
35+
node {
36+
ns
37+
data
38+
language
39+
}
40+
}
41+
}
42+
}
43+
`;

src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from "react"
22
import { useTranslation } from 'gatsby-plugin-react-i18next';
3-
3+
import { graphql } from 'gatsby';
44
import Layout from "../components/layout"
55
import SEO from "../components/seo"
66
import Hero from "../components/hero";

0 commit comments

Comments
 (0)