11import Yapp from './yapp' ;
22
3- /* 리크루팅 상태: PRE(모집 오픈 전), ACTIVE(모집 중), POST(모집 마감) */
3+ /* 리크루팅 상태: PRE(모집 오픈 전), ACTIVE(모집 중), POST(모집 마감), EXTRA(추가 모집) */
44export enum RecruitStatus {
55 PRE = 'PRE' ,
66 ACTIVE = 'ACTIVE' ,
77 POST = 'POST' ,
8+ EXTRA = 'EXTRA' ,
89}
910
1011export const RECRUITING_START = '2026-04-17T00:00:00' ;
1112export const RECRUITING_DEADLINE = '2026-04-26T23:59:59' ;
13+ export const RECRUITING_EXTRA_DEADLINE = '2026-04-28T23:59:59' ;
1214
1315export const RECRUITING_STATUS = ( ) : RecruitStatus => {
1416 const now = new Date ( ) ;
1517 const start = new Date ( RECRUITING_START ) ;
1618 const deadline = new Date ( RECRUITING_DEADLINE ) ;
19+ const extraDeadline = new Date ( RECRUITING_EXTRA_DEADLINE ) ;
1720
1821 if ( now < start ) return RecruitStatus . PRE ;
22+ if ( now > deadline && now <= extraDeadline ) return RecruitStatus . EXTRA ;
1923 if ( now > deadline ) return RecruitStatus . POST ;
2024 return RecruitStatus . ACTIVE ;
2125} ;
@@ -24,4 +28,5 @@ export const LINK_BY_STATUS: Record<RecruitStatus, string> = {
2428 [ RecruitStatus . PRE ] : Yapp . PREVIOUS_GENERATION_RECRUIT_LINK ,
2529 [ RecruitStatus . ACTIVE ] : Yapp . YAPP_RECRUIT_ALL ,
2630 [ RecruitStatus . POST ] : Yapp . NEXT_GENERATION_RECRUIT_LINK ,
31+ [ RecruitStatus . EXTRA ] : Yapp . YAPP_RECRUIT_ALL ,
2732} ;
0 commit comments