File tree Expand file tree Collapse file tree 1 file changed +31
-19
lines changed
Expand file tree Collapse file tree 1 file changed +31
-19
lines changed Original file line number Diff line number Diff line change 1- import { Link } from "react-router-dom" ;
1+ import { Link , useNavigate } from "react-router-dom" ;
22import LoginButton from "../button/LoginButton" ;
33
4- const MainHeader = ( { isLoggedIn} : { isLoggedIn : boolean } ) => {
4+ const MainHeader = ( { isLoggedIn } : { isLoggedIn : boolean } ) => {
5+ const navigate = useNavigate ( ) ;
6+
7+ const handleNavigate = ( ) => {
8+ navigate ( "/my-info" ) ;
9+ } ;
10+
511 return (
6- < header className = "bg-white flex h-[56px] w-full justify-between items-center px-5" >
12+ < header className = "flex h-[56px] w-full items-center justify-between bg-white px-5" >
713 < Link to = "/" className = "flex items-center" >
8- < img
9- src = "/public/icon/mbtipslogo.svg"
10- alt = "Logo"
11- width = { 110 }
12- height = { 31 }
13- />
14+ < img
15+ src = "/public/icon/mbtipslogo.svg"
16+ alt = "Logo"
17+ width = { 110 }
18+ height = { 31 }
19+ />
1420 </ Link >
15- { ! isLoggedIn ? < LoginButton /> : < img
16- src = "/public/icon/people.svg"
17- alt = "Login Done"
18- className = "mx-auto mr-[20px]"
19- width = { 24 }
20- height = { 24 }
21- /> }
22- </ header > )
23- }
21+ { ! isLoggedIn ? (
22+ < LoginButton />
23+ ) : (
24+ < img
25+ src = "/public/icon/people.svg"
26+ alt = "Login Done"
27+ className = "mx-auto mr-[20px] cursor-pointer"
28+ width = { 24 }
29+ height = { 24 }
30+ onClick = { handleNavigate }
31+ />
32+ ) }
33+ </ header >
34+ ) ;
35+ } ;
2436
25- export default MainHeader ;
37+ export default MainHeader ;
You can’t perform that action at this time.
0 commit comments