File tree Expand file tree Collapse file tree 2 files changed +61
-12
lines changed
frontend/src/pages/not-found Expand file tree Collapse file tree 2 files changed +61
-12
lines changed Original file line number Diff line number Diff line change 1
- import { Link } from '~/libs/components/components.js' ;
1
+ import { Button } from '~/libs/components/components.js' ;
2
2
import { AppRoute } from '~/libs/enums/enums.js' ;
3
+ import { useCallback , useNavigate } from '~/libs/hooks/hooks.js' ;
3
4
4
- const NotFound = ( ) : JSX . Element => (
5
- < div >
6
- < h2 >
7
- Oops, the dreaded < span > 404</ span > .
8
- </ h2 >
5
+ import styles from './styles.module.scss' ;
9
6
10
- < p > Let's get you back on track.</ p >
7
+ const NotFound = ( ) : JSX . Element => {
8
+ const navigate = useNavigate ( ) ;
11
9
12
- < Link to = { AppRoute . ROOT } >
13
- < span > Back to Home page</ span >
14
- </ Link >
15
- </ div >
16
- ) ;
10
+ const handleClick = useCallback ( ( ) => {
11
+ navigate ( AppRoute . ROOT ) ;
12
+ } , [ navigate ] ) ;
13
+
14
+ return (
15
+ < div className = { styles . page } >
16
+ < h1 className = { styles . code } > 404</ h1 >
17
+ < p className = { styles . message } > OOPS! PAGE NOT FOUND</ p >
18
+ < Button
19
+ className = { styles . link }
20
+ label = "GO TO HOMEPAGE"
21
+ onClick = { handleClick }
22
+ />
23
+ </ div >
24
+ ) ;
25
+ } ;
17
26
18
27
export { NotFound } ;
Original file line number Diff line number Diff line change
1
+ @import " src/assets/css/vars.scss" ;
2
+
3
+ .page {
4
+ display : flex ;
5
+ flex-flow : column ;
6
+ justify-content : center ;
7
+ align-items : center ;
8
+ height : 100vh ;
9
+ background-color : $blue-dark ;
10
+ background-image : url (" ../../assets/img/auth-page-bg.svg" );
11
+ background-repeat : no-repeat ;
12
+ background-position : center ;
13
+ background-size : cover ;
14
+ }
15
+
16
+ .code {
17
+ color : $white ;
18
+ font-weight : $font-weight-extrabold ;
19
+ font-size : 220px ;
20
+ font-family : $font-family ;
21
+ }
22
+
23
+ .message {
24
+ margin-bottom : 40px ;
25
+ color : $white ;
26
+ font-weight : $font-weight-bold ;
27
+ font-size : 28px ;
28
+ font-family : $font-family ;
29
+ }
30
+
31
+ .link {
32
+ padding : 15px ;
33
+ color : $white ;
34
+ font-size : 16px ;
35
+ font-family : $font-family ;
36
+ background-color : $red-dark ;
37
+ border-radius : 5px ;
38
+ box-shadow : 0 4px 4px 0 rgb (0 0 0 / 40% );
39
+ cursor : pointer ;
40
+ }
You can’t perform that action at this time.
0 commit comments