From 993b0f565c00824160a175e951c6c1e73f8c4e8c Mon Sep 17 00:00:00 2001 From: HyeonJin Date: Tue, 22 Oct 2024 17:22:01 +0900 Subject: [PATCH] :recycle: Edit SignUp logic and UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #299 회원가입 로직 수정및 팀빌딩 로직 수정 --- gongjakso/src/features/modal/SignUpModal.jsx | 2 +- .../pages/ContestListPage/ContestListPage.jsx | 10 +++-- .../TeamBuildPage/TeamBuildingUploadPage.jsx | 37 +++++++++++++++++-- 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/gongjakso/src/features/modal/SignUpModal.jsx b/gongjakso/src/features/modal/SignUpModal.jsx index 26781eb4..01fdd4be 100644 --- a/gongjakso/src/features/modal/SignUpModal.jsx +++ b/gongjakso/src/features/modal/SignUpModal.jsx @@ -120,7 +120,7 @@ const SignUpModal = ({ closeSignUpModal, name }) => { 안녕하세요, 공작소에 오신 것을 환영합니다. - 3가지만 입력하면 맞춤형 활동을 시작할 수 있습니다! + 4가지만 입력하면 맞춤형 활동을 시작할 수 있습니다! diff --git a/gongjakso/src/pages/ContestListPage/ContestListPage.jsx b/gongjakso/src/pages/ContestListPage/ContestListPage.jsx index 595b5e3b..a9f26b51 100644 --- a/gongjakso/src/pages/ContestListPage/ContestListPage.jsx +++ b/gongjakso/src/pages/ContestListPage/ContestListPage.jsx @@ -10,6 +10,7 @@ import { SelectInput } from '../../components/common/Input/Input'; import ContestListBox from '../ContestListBox/ContestListBox'; import Pagination from '../../components/Pagination/Pagination'; import { getContestList } from '../../service/post_service'; +import Modal1 from '../../features/modal/LoginModal1'; const ContestListPage = () => { const [banners, setBanners] = useState([]); @@ -155,10 +156,10 @@ const ContestListPage = () => { ) : ( @@ -185,6 +186,7 @@ const ContestListPage = () => { loadPosts={loadContestList} /> + {modal1Open && } ); }; diff --git a/gongjakso/src/pages/TeamBuildPage/TeamBuildingUploadPage.jsx b/gongjakso/src/pages/TeamBuildPage/TeamBuildingUploadPage.jsx index 0c5be465..23bbf615 100644 --- a/gongjakso/src/pages/TeamBuildPage/TeamBuildingUploadPage.jsx +++ b/gongjakso/src/pages/TeamBuildPage/TeamBuildingUploadPage.jsx @@ -72,19 +72,48 @@ const TeamBuildingUploadPage = ({ posts, contestDetail, contestData }) => { }, }); + // const handleOptionChange = option => { + // if (option === 'ONLINE') { + // if (meeting === 'ONLINE') { + // alert('온라인 모임은 이미 선택되어 있습니다.'); + // } else { + // setMeeting('ONLINE'); + // } + // } else if (option === 'OFFLINE') { + // if (meeting === 'OFFLINE') { + // alert('오프라인 모임은 이미 선택되어 있습니다.'); + // } else { + // setMeeting('OFFLINE'); + // } + // } + // setBtn(true); + // }; + const handleOptionChange = option => { if (option === 'ONLINE') { if (meeting === 'ONLINE') { - alert('온라인 모임은 이미 선택되어 있습니다.'); + alert('둘 중 하나를 꼭 선택해주세요'); + } else if (meeting === 'OFFLINE') { + setMeeting('HYBRID'); + } else if (meeting === 'HYBRID') { + setMeeting('OFFLINE'); } else { setMeeting('ONLINE'); } } else if (option === 'OFFLINE') { if (meeting === 'OFFLINE') { - alert('오프라인 모임은 이미 선택되어 있습니다.'); + alert('둘 중 하나를 꼭 선택해주세요'); + } else if (meeting === 'ONLINE') { + setMeeting('HYBRID'); + } else if (meeting === 'HYBRID') { + setMeeting('ONLINE'); } else { setMeeting('OFFLINE'); } + } else { + setMeeting(prevMeeting => + prevMeeting === 'HYBRID' ? null : 'HYBRID', + ); } setBtn(true); }; @@ -282,7 +311,7 @@ const TeamBuildingUploadPage = ({ posts, contestDetail, contestData }) => { handleOptionChange('OFFLINE')} > @@ -290,7 +319,7 @@ const TeamBuildingUploadPage = ({ posts, contestDetail, contestData }) => { handleOptionChange('ONLINE')} >