Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
polokpawel committed May 14, 2024
1 parent 0f51982 commit e42ee1f
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 5 deletions.
36 changes: 31 additions & 5 deletions website/src/pages/notFound.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
import styles from '@/styles/notFound.module.scss'
import { AnimateWrapper } from '@/components/animateWrapper/animateWrapper'
import { Container } from '@/components/container/container'
import { Overlay } from '@/components/overlay/overlay'
import { SEO } from '@/components/seo'
import { useScrollTop } from '@/hooks/useScrollTop'
import { Link } from 'react-router-dom'

const metaData = {
title: 'Not Found',
description: 'Page not found',
path: '/404',
}

export default function NotFound() {
useScrollTop()

return (
<div>
<h1>404</h1>
<p>Page not found</p>
</div>
<>
<SEO title={metaData.title} description={metaData.description} path={metaData.path} />

<Overlay>
<AnimateWrapper>
<Container>
<div className={styles.notFoundMainContainer}>
<h1>404</h1>
<p>Page not found</p>
<Link to={'/'}>
Back to home page
</Link>
</div>
</Container>
</AnimateWrapper>
</Overlay>
</>
)
}
}
38 changes: 38 additions & 0 deletions website/src/styles/notFound.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@import "variables.scss";
@import "mixins.scss";

.notFoundMainContainer {
height: calc(100vh - 64px - 73px - 100px);
@include flex(column, center, center);

h1 {
@include font(700, 112px, 100%, center);
color: $neutral-900;
}

p {
margin: 0 0 24px 0;
font: 500 16px/24px $font-family;
color: $neutral-500
}

a {
padding: 8px 16px;
border-radius: 12px;
border: 1px solid $neutral-200;
font: 500 14px/20px $font-family;
background-color: $white;
box-shadow: $drop-shadow-small;

transition: background-color .2s;

img {
width: 100%;
max-width: 400px;
}
&:is(:hover, :focus) {
background-color: $neutral-100;
}
}

}

0 comments on commit e42ee1f

Please sign in to comment.