Skip to content

Commit

Permalink
feat: 24기 지원마감 (PM 제외) (#161)
Browse files Browse the repository at this point in the history
youngminss authored Apr 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents ddde9ec + 7ccc431 commit 50fc7f2
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 9 additions & 3 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 } from 'database/recruit';
import { IS_RECRUITING, IS_RECRUIT_CLOSED_EXCEPT_PM } from 'database/recruit';
import DOMPurify from 'isomorphic-dompurify';
import { ReactElement } from 'react';
import styled from 'styled-components';
@@ -28,6 +28,8 @@ function RecruitFieldExplain({
}: RecruitFieldExplainProps): ReactElement {
const { content1, content2, content3 } = explainContents;

const isPM = fieldName === 'PM';

return (
<RecruitFieldWrapper>
<FieldBox backgroundColor="grey_50">
@@ -76,10 +78,14 @@ function RecruitFieldExplain({
fontColor="white"
buttonColor="grey_850"
borderColor="lightGrey"
disabled={!IS_RECRUITING}
disabled={!IS_RECRUITING || (IS_RECRUIT_CLOSED_EXCEPT_PM && !isPM)}
>
{isDeveloper ? developField : fieldName}{' '}
{IS_RECRUITING ? '지원하기' : '지원마감'}
{IS_RECRUITING && !IS_RECRUIT_CLOSED_EXCEPT_PM
? '지원하기'
: IS_RECRUIT_CLOSED_EXCEPT_PM && isPM
? '지원하기'
: '지원마감'}
</ApplyButton>
</ButtonBlock>
</RecruitFieldWrapper>
5 changes: 5 additions & 0 deletions database/recruit.ts
Original file line number Diff line number Diff line change
@@ -11,6 +11,11 @@ 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;

/** Banner */
export const RECRUIT_BANNER = {
title: '지금은 모집기간이 아닙니다',

0 comments on commit 50fc7f2

Please sign in to comment.