Skip to content

Commit

Permalink
fix: 신청 기간이 아닐 경우에 대한 에러
Browse files Browse the repository at this point in the history
  • Loading branch information
SongInjae committed Dec 1, 2023
1 parent 0c0c003 commit 7b03875
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/UserApplyButton/UserApplyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ const UserApplyButton = ({ isToken, eventId, eventDetail, applyModalOpen }: User
return EVENT_DETAIL_BUTTON.APPLY.APPLICANT;
} else if (category !== 'RECRUITMENT' && applicants >= capacity) {
return EVENT_DETAIL_BUTTON.APPLY.SOLD_OUT;
} else if (isEnded || isAbleToApply) {
} else if (isEnded) {
return EVENT_DETAIL_BUTTON.APPLY.DEADLINE;
} else if (!isAbleToApply) {
return EVENT_DETAIL_BUTTON.APPLY.NOT_PERIOD;
} else {
return EVENT_DETAIL_BUTTON.APPLY.POSSIBLE;
}
Expand Down
1 change: 1 addition & 0 deletions src/constants/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const EVENT_DETAIL_BUTTON = {
DELETE: '삭제하기',
APPLY: {
COMPLETED: '신청 완료',
NOT_PERIOD: '신청 기간이 아닙니다.',
SOLD_OUT: 'SOLD OUT',
DEADLINE: '신청 마감',
APPLICANT: '인원 마감',
Expand Down
1 change: 1 addition & 0 deletions src/pages/event/EventDetailPage/EventDetailPage.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const ApplicantButton = styled(SemiPurpleButton)<{ capacity: boolean; isDisabled
const ApplyButton = styled(SemiPurpleButton)<{ capacity: boolean }>`
width: 30%;
min-width: 10rem;
padding: 0;
border-top-left-radius: ${({ capacity }) => capacity && '0'};
border-bottom-left-radius: ${({ capacity }) => capacity && '0'};
font-size: ${Theme.fontSize.mediumContent};
Expand Down

0 comments on commit 7b03875

Please sign in to comment.