-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from codestates-seb/dev-client#123/refactor2
[FE] 김병현 코드 리팩토링Dev client#123/refactor2
- Loading branch information
Showing
2 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import { useSelector } from 'react-redux'; | ||
import { RootState } from '../../store/config'; | ||
import LoginHeader from './LoginHeader'; | ||
import LogoutHeader from './LogoutHeader'; | ||
|
||
const Header: React.FC = () => { | ||
const isLogin = useSelector((state: RootState) => state.login); | ||
|
||
if (isLogin === 1) { | ||
return <LoginHeader onProfileClick={() => { /* Handle profile click logic here */ }} />; | ||
} | ||
|
||
return <LogoutHeader onLoginClick={() => { /* Handle login click logic here */ }} />; | ||
} | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters