Skip to content

Commit

Permalink
feat: add page not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Mar 30, 2022
1 parent 5f311a2 commit bd73058
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/assets/barber-404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/pages/NotFound/NotFound.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.home {
display: flex;
width: 100%;
height: 100vh;
align-items: center;
flex-direction: column;
justify-content: center;
background: var(--background);

h1 {
color: var(--orange);
font-size: 48px;
}

img {
width: 60%;
height: 60%;
}
}
25 changes: 25 additions & 0 deletions src/pages/NotFound/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import barberImg from 'assets/barber-404.svg';

import { Button } from 'components/Button';

import { useTheme } from 'contexts/Theme';

import styles from './NotFound.module.scss';

export function NotFound() {
const { theme } = useTheme();

return (
<div className={styles.home} data-theme={theme}>
<h1>Erro 404</h1>
<img src={barberImg} alt="Barbeiro cortando cabelo" />
<p>Ops, parece que você está procurando por algo que não existe.</p>

<br />

<Button type="button" onClick={() => window.location.replace('/')}>
Voltar para a página inicial
</Button>
</div>
);
}

0 comments on commit bd73058

Please sign in to comment.