Skip to content

Commit

Permalink
modify: 24기 서류 마감 (#162)
Browse files Browse the repository at this point in the history
youngminss authored Apr 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 50fc7f2 + 72e27ef commit fb15727
Showing 2 changed files with 5 additions and 16 deletions.
12 changes: 3 additions & 9 deletions components/recruit/RecruitField/RecruitFieldExplain.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Button } from 'components/common';
import Breakpoints from 'constants/breakpoints';
import { IS_RECRUITING, IS_RECRUIT_CLOSED_EXCEPT_PM } from 'database/recruit';
import { IS_RECRUITING } from 'database/recruit';
import DOMPurify from 'isomorphic-dompurify';
import { ReactElement } from 'react';
import styled from 'styled-components';
@@ -28,8 +28,6 @@ function RecruitFieldExplain({
}: RecruitFieldExplainProps): ReactElement {
const { content1, content2, content3 } = explainContents;

const isPM = fieldName === 'PM';

return (
<RecruitFieldWrapper>
<FieldBox backgroundColor="grey_50">
@@ -78,14 +76,10 @@ function RecruitFieldExplain({
fontColor="white"
buttonColor="grey_850"
borderColor="lightGrey"
disabled={!IS_RECRUITING || (IS_RECRUIT_CLOSED_EXCEPT_PM && !isPM)}
disabled={!IS_RECRUITING}
>
{isDeveloper ? developField : fieldName}{' '}
{IS_RECRUITING && !IS_RECRUIT_CLOSED_EXCEPT_PM
? '지원하기'
: IS_RECRUIT_CLOSED_EXCEPT_PM && isPM
? '지원하기'
: '지원마감'}
{IS_RECRUITING ? '지원하기' : '지원마감'}
</ApplyButton>
</ButtonBlock>
</RecruitFieldWrapper>
9 changes: 2 additions & 7 deletions database/recruit.ts
Original file line number Diff line number Diff line change
@@ -9,17 +9,12 @@ import Yapp from 'constants/yapp';
*/

/* 현재 모집중이면 true 아니면 false */
export const IS_RECRUITING = true;

// TODO : remove (= PM 직군만 연장하므로 다른 직군은 지원버튼 비활성화하기 위해 마감일 생성)
const recruitCloseDateExceptPM = new Date(2024, 3, 14, 0, 0, 0);
const now = new Date();
export const IS_RECRUIT_CLOSED_EXCEPT_PM = now > recruitCloseDateExceptPM;
export const IS_RECRUITING = false;

/** Banner */
export const RECRUIT_BANNER = {
title: '지금은 모집기간이 아닙니다',
description: `현재 ${Yapp.YAPP_GENERATION}활동 중! 다음 기수는 2024년 4월에 예정되어 있습니다`,
description: `${Yapp.YAPP_GENERATION}모집이 완료되었습니다!<br />다음 기수는 2024년 10월에 예정되어 있습니다.`,
buttonName: `${Number(Yapp.YAPP_GENERATION) + 1}기에서 만나요!`,
};

0 comments on commit fb15727

Please sign in to comment.