404 style

This commit is contained in:
memeriau 2021-12-26 22:51:00 +01:00
parent 2e2442bb7a
commit 2d97d5886f
4 changed files with 13 additions and 37 deletions

View File

@ -1,21 +0,0 @@
/**
* @jest-environment jsdom
*/
import { render } from "@testing-library/react"
import { MemoryRouter } from "react-router-dom"
import NotFound from "../index"
describe("<NotFound />", () => {
it("renders", () => {
const tree = render(
<MemoryRouter>
{/*
@ts-expect-error */}
<NotFound />
</MemoryRouter>
).container.firstChild
expect(tree).toMatchSnapshot()
})
})

View File

@ -1,11 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<NotFound /> renders 1`] = `
<div
class="NotFound"
>
<p>
Oops, Page was not found!
</p>
</div>
`;

View File

@ -13,9 +13,11 @@ const NotFound = ({ staticContext }: Props) => {
if (staticContext) staticContext.statusCode = 404
return (
<div className={styles.NotFound}>
<div className={styles.notFoundPage}>
<div className={styles.notFoundContent}>
<Helmet title="Oops" />
<p>Oops, Page was not found!</p>
<p>Oops, page was not found!</p>
</div>
</div>
)
}

View File

@ -1,3 +1,9 @@
.NotFound {
padding: 0 15px;
@import "../../theme/mixins";
.notFoundPage {
@include page-wrapper-center;
}
.notFoundContent {
@include page-content-wrapper;
}