1
+ import { useNavigate } from 'react-router-dom' ;
2
+
1
3
import { Button } from '@components/shared/Button' ;
2
4
import { Header } from '@components/shared/Header' ;
3
5
import { MatchItem } from '@components/shared/MatchItem' ;
4
6
import { Text } from '@components/shared/Text' ;
5
7
6
8
import { theme } from '@styles/theme' ;
7
9
10
+ import { PATH_NAME } from '@consts/pathName' ;
11
+
8
12
import { MainPageContainer , MainPageSubContainer } from './MainPage.style' ;
9
13
10
14
export const MainPage = ( ) => {
15
+ const navigate = useNavigate ( ) ;
11
16
return (
12
17
< MainPageContainer >
13
18
< Header isLogo = { true } />
@@ -35,7 +40,10 @@ export const MainPage = () => {
35
40
/>
36
41
)
37
42
) }
38
- < Button { ...MAIN_PAGE_BUTTON_PROP } > </ Button >
43
+ < Button
44
+ { ...MAIN_PAGE_BUTTON_PROP }
45
+ handleClick = { ( ) => navigate ( PATH_NAME . GAMES_NEAR ) }
46
+ > </ Button >
39
47
</ MainPageSubContainer >
40
48
< MainPageSubContainer >
41
49
< Text children = { '추천 크루' } weight = { 700 } size = { '1.25rem' } />
@@ -61,7 +69,10 @@ export const MainPage = () => {
61
69
/>
62
70
)
63
71
) }
64
- < Button { ...MAIN_PAGE_BUTTON_PROP } > </ Button >
72
+ < Button
73
+ { ...MAIN_PAGE_BUTTON_PROP }
74
+ handleClick = { ( ) => console . log ( 'hi' ) }
75
+ > </ Button >
65
76
</ MainPageSubContainer >
66
77
</ MainPageContainer >
67
78
) ;
@@ -116,5 +127,4 @@ const MAIN_PAGE_BUTTON_PROP = {
116
127
textColor : `${ theme . PALETTE . RED_400 } ` ,
117
128
borderColor : `${ theme . PALETTE . RED_400 } ` ,
118
129
backgroundColor : 'white' ,
119
- handleClick : ( ) => console . log ( 'hi' ) ,
120
130
} ;
0 commit comments