Skip to content

Commit

Permalink
♻️ Edit SignUp logic and UI
Browse files Browse the repository at this point in the history
#299 회원가입 로직 수정및 팀빌딩 로직 수정
  • Loading branch information
Herrypi committed Oct 22, 2024
1 parent b588140 commit 993b0f5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gongjakso/src/features/modal/SignUpModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const SignUpModal = ({ closeSignUpModal, name }) => {
<S.Container>
<S.Title>안녕하세요, 공작소에 오신 것을 환영합니다.</S.Title>
<S.Title>
3가지만 입력하면 맞춤형 활동을 시작할 수 있습니다!
4가지만 입력하면 맞춤형 활동을 시작할 수 있습니다!
</S.Title>
<S.BoxContainer>
<S.Box>
Expand Down
10 changes: 6 additions & 4 deletions gongjakso/src/pages/ContestListPage/ContestListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);
Expand Down Expand Up @@ -155,10 +156,10 @@ const ContestListPage = () => {
) : (
<button onClick={() => showModal1()}>
<ContestListBox
contestTitle={contest.contestTitle}
image={contest.image}
contestId={contest.contestId}
remainDate={contest.remainDate}
contestTitle={contest.title}
image={contest.imgUrl}
contestId={contest.id}
remainDate={contest.dayState}
company={contest.institution}
/>
</button>
Expand All @@ -185,6 +186,7 @@ const ContestListPage = () => {
loadPosts={loadContestList}
/>
</S.MainContent>
{modal1Open && <Modal1 closeModal1={closeModal1} />}
</>
);
};
Expand Down
37 changes: 33 additions & 4 deletions gongjakso/src/pages/TeamBuildPage/TeamBuildingUploadPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down Expand Up @@ -282,15 +311,15 @@ const TeamBuildingUploadPage = ({ posts, contestDetail, contestData }) => {
</S.TapP>
<S.ClickBtn
$isselected={
meeting === 'OFFLINE' || meeting === 'BOTH'
meeting === 'OFFLINE' || meeting === 'HYBRID'
}
onClick={() => handleOptionChange('OFFLINE')}
>
오프라인
</S.ClickBtn>
<S.ClickBtn
$isselected={
meeting === 'ONLINE' || meeting === 'BOTH'
meeting === 'ONLINE' || meeting === 'HYBRID'
}
onClick={() => handleOptionChange('ONLINE')}
>
Expand Down

0 comments on commit 993b0f5

Please sign in to comment.