diff --git a/FE/src/components/Header/Header.js b/FE/src/components/Header/Header.js index 4007a04..0b97687 100644 --- a/FE/src/components/Header/Header.js +++ b/FE/src/components/Header/Header.js @@ -13,7 +13,7 @@ function Header() { return ( <> - + { @@ -21,7 +21,10 @@ function Header() { }} alt='logo' /> - {!userState.isLogin ? ( + + + {!userState.isLogin ? ( + { @@ -46,7 +49,10 @@ function Header() { 로그인 - ) : ( + + ) : ( + + {userState.nickname}님의 별숲 - )} - + + )} + {HeaderState.isSideBar ? : null} ); } const HeaderWrapper = styled.header` - width: 100%; height: 5rem; z-index: 1004; position: absolute; top: 0; + ${(props) => (props.position === "left" ? "left: 0;" : "right: 0;")} display: flex; justify-content: space-between; @@ -113,4 +120,12 @@ const SideBarImg = styled.img` cursor: pointer; `; +const NickName = styled.div` + flex-shrink: 0; + font-size: 1.2rem; + font-weight: thin; + color: #fff; + margin-right: 2vw; +`; + export default Header; diff --git a/FE/src/pages/MainPage.js b/FE/src/pages/MainPage.js index bec9826..b034cb5 100644 --- a/FE/src/pages/MainPage.js +++ b/FE/src/pages/MainPage.js @@ -191,9 +191,6 @@ function MainPage() {
{loaded ? ( - - {userState.nickname}님의 별숲 - {diaryState.isCreate ? : null} {diaryState.isRead ? ( @@ -220,25 +217,4 @@ const MainPageWrapper = styled.div` overflow: hidden; `; -const NickNameWrapper = styled.div` - width: 100%; - height: 5rem; - display: flex; - justify-content: flex-end; - align-items: center; - - position: absolute; - top: 0; - right: 5rem; - - z-index: 1001; -`; - -const NickName = styled.div` - font-size: 1.2rem; - font-weight: thin; - color: #fff; - margin-right: 2vw; -`; - export default MainPage;