Skip to content

Commit

Permalink
fix: 발표 결과 확인 주석처리
Browse files Browse the repository at this point in the history
  • Loading branch information
kimjh11130 committed Jul 26, 2023
1 parent 353d726 commit 82cf0d4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/pages/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ const MyPage = () => {
const { mutate: deleteUserPdf } = DeleteUserPdf(data?.receipt_code);
const onDownloadPdf = DownloadPdf();

const { data: schedule } = getSchedule();
const currentDate = new Date();
const firstAnnouncementDate = new Date(schedule?.schedules[2]?.date ?? '');
const secondAnnouncementDate = new Date(schedule?.schedules[4]?.date ?? '');
const { data: firstPass } = GetFirstRoundPass();
const { data: secondPass } = GetSecondRoundPass();

let message;
if (firstAnnouncementDate <= currentDate && currentDate.getDate() <= secondAnnouncementDate.getDate() + 3) {
message = firstPass ? '1차 전형에 합격하였습니다!' : '1차 전형에 합격하지 못하였습니다.';
} else if (secondAnnouncementDate <= currentDate && currentDate.getDate() <= secondAnnouncementDate.getDate() + 3) {
message = secondPass ? '최종합격되었습니다.' : '불합격입니다.';
} else {
message = '지금은 발표기간이 아닙니다';
}
// const { data: schedule } = getSchedule();
// const currentDate = new Date();
// const firstAnnouncementDate = new Date(schedule?.schedules[2]?.date ?? '');
// const secondAnnouncementDate = new Date(schedule?.schedules[4]?.date ?? '');
// const { data: firstPass } = GetFirstRoundPass();
// const { data: secondPass } = GetSecondRoundPass();
//
// let message;
// if (firstAnnouncementDate <= currentDate && currentDate.getDate() <= secondAnnouncementDate.getDate() + 3) {
// message = firstPass ? '1차 전형에 합격하였습니다!' : '1차 전형에 합격하지 못하였습니다.';
// } else if (secondAnnouncementDate <= currentDate && currentDate.getDate() <= secondAnnouncementDate.getDate() + 3) {
// message = secondPass ? '최종합격되었습니다.' : '불합격입니다.';
// } else {
// message = '지금은 발표기간이 아닙니다';
// }

const { data: myQnaList } = GetMyQna();

Expand Down Expand Up @@ -106,7 +106,7 @@ const MyPage = () => {
<_ApplyButtons>
<Pc>
<Button onClick={onDownloadPdf}>원서 다운로드</Button>
<Button onClick={() => alert(message)}>발표 결과 확인</Button>
<Button onClick={onClick}>발표 결과 확인</Button>
<Button color="delete" kind="delete" onClick={openCancelSubmitModal}>
원서 최종제출 취소
</Button>
Expand Down

0 comments on commit 82cf0d4

Please sign in to comment.