Add 404 page

This commit is contained in:
Marcus Blättermann 2022-12-20 22:06:08 +01:00
parent eafb8511b6
commit df6c4416f8
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D

View File

@ -1,15 +1,16 @@
import React from 'react' import React from 'react'
import { window } from 'browser-monads' import { window } from 'browser-monads'
import classNames from 'classnames'
import Template from '../templates/index' import Template from '../src/templates/index'
import { LandingHeader, LandingTitle } from '../components/landing' import { LandingHeader, LandingTitle } from '../src/components/landing'
import Button from '../components/button' import { nightly, legacy } from '../meta/dynamicMeta'
import { nightly, legacy } from '../../meta/dynamicMeta' import classes from '../src/styles/button.module.sass'
const page404 = ({ location }) => { const page404 = () => {
const pageContext = { title: '404 Error', searchExclude: true, isIndex: false } const pageContext = { title: '404 Error', searchExclude: true, isIndex: false }
return ( return (
<Template pageContext={pageContext} location={location}> <Template {...pageContext}>
<LandingHeader style={{ minHeight: 400 }} nightly={nightly} legacy={legacy}> <LandingHeader style={{ minHeight: 400 }} nightly={nightly} legacy={legacy}>
<LandingTitle> <LandingTitle>
Ooops, this page Ooops, this page
@ -17,9 +18,12 @@ const page404 = ({ location }) => {
does not exist! does not exist!
</LandingTitle> </LandingTitle>
<br /> <br />
<Button onClick={() => window.history.go(-1)} variant="tertiary"> <button
onClick={() => window.history.go(-1)}
className={classNames(classes.root, classes.tertiary)}
>
Click here to go back Click here to go back
</Button> </button>
</LandingHeader> </LandingHeader>
</Template> </Template>
) )