diff --git a/public/img/icon-search.svg b/public/img/icon-search.svg index 35ba70c..54dc7d2 100644 --- a/public/img/icon-search.svg +++ b/public/img/icon-search.svg @@ -1,3 +1,3 @@ - - + + diff --git a/public/img/icon-user-black.svg b/public/img/icon-user-black.svg new file mode 100644 index 0000000..e5ef743 --- /dev/null +++ b/public/img/icon-user-black.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/BookingSearchContainer/BookingSearchContainer.tsx b/src/components/BookingSearchContainer/BookingSearchContainer.tsx index 40b36f5..3891a72 100644 --- a/src/components/BookingSearchContainer/BookingSearchContainer.tsx +++ b/src/components/BookingSearchContainer/BookingSearchContainer.tsx @@ -1,8 +1,11 @@ +/** @jsxImportSource @emotion/react */ + import styled from '@emotion/styled'; import variables from '@styles/Variables'; import useModal from '@hooks/useModal'; import LocalDateSelectionModal from '@pages/Home/components/LocalDateSelectionModal'; import { useNavigate } from 'react-router-dom'; +import { Hidden } from '@styles/Common'; /** 메인 전체 지역 예약 날짜 선택 등 */ // button => 모달 오픈용 searchStyle => 검색용 @@ -10,20 +13,39 @@ const BookingSearchContainer = () => { const modal = useModal(); const navigate = useNavigate(); + // user 정보 세션에서 가져오기 + const user = false; + return ( - 전체 지역 탐색 - { - e.stopPropagation(); - navigate('/search'); - }} - > - 상세 정보 검색 - - - 예약 날짜와 시간을 선택해주세요. +
+ + 예약 날짜와 시간을 선택해주세요. +
+ + { + e.stopPropagation(); + navigate('/search'); + }} + > + 검색 + 상세 정보 검색 + + + { + e.stopPropagation(); + navigate(`/user/${user ? 'mypage' : 'login'}`); + }} + > + {user ? '마이페이지' : '로그인'} + {user + ); @@ -31,7 +53,7 @@ const BookingSearchContainer = () => { const BookingSearchContainerStyle = styled.div` display: flex; - flex-direction: column; + align-items: center; margin-bottom: 1.8rem; `; @@ -43,17 +65,34 @@ const Button = styled.button` gap: 0.4rem; `; -const SearchStyle = styled.div` - margin-left: auto; +const ButtonStyle = styled.button` display: flex; justify-content: center; align-items: center; + padding: 0.8rem; + width: 2.4rem; + height: 2.4rem; + + &.search { + margin-left: auto; + + & > img { + width: 1.7rem; + } + } + + &.user { + & > img { + width: 1.6rem; + } + } `; const ButtonTitleStyle = styled.h1` font-size: 1.8rem; font-weight: 600; `; + const ButtonTitleDes = styled.p` color: ${variables.colors.gray600}; `; diff --git a/src/pages/User/Login.tsx b/src/pages/User/Login.tsx new file mode 100644 index 0000000..7a8dcef --- /dev/null +++ b/src/pages/User/Login.tsx @@ -0,0 +1,12 @@ +import { Link } from 'react-router-dom'; + +const Login = () => { + return ( + <> + 로그인 페이지 + 회원가입 + + ); +}; + +export default Login; diff --git a/src/pages/User/MyPage.tsx b/src/pages/User/MyPage.tsx new file mode 100644 index 0000000..73b75c5 --- /dev/null +++ b/src/pages/User/MyPage.tsx @@ -0,0 +1,5 @@ +const MyPage = () => { + return <>마이페이지; +}; + +export default MyPage; diff --git a/src/pages/User/SignUp.tsx b/src/pages/User/SignUp.tsx new file mode 100644 index 0000000..059eff8 --- /dev/null +++ b/src/pages/User/SignUp.tsx @@ -0,0 +1,5 @@ +const SignUp = () => { + return <>회원가입 페이지; +}; + +export default SignUp; diff --git a/src/routes.tsx b/src/routes.tsx index 8659fa3..077201a 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,3 +1,6 @@ +import Login from '@pages/User/Login'; +import MyPage from '@pages/User/MyPage'; +import SignUp from '@pages/User/Signup'; import { lazy } from 'react'; import { createBrowserRouter } from 'react-router-dom'; @@ -16,6 +19,23 @@ const router = createBrowserRouter([ path: '/', element: , }, + { + path: 'user', + children: [ + { + path: 'login', + element: , + }, + { + path: 'signup', + element: , + }, + { + path: 'mypage', + element: , + }, + ], + }, { path: 'search', element: ,