From 0fd99a2e0a9fa5c2dc39b214d209d083457cd119 Mon Sep 17 00:00:00 2001 From: HaJunRyu Date: Sat, 20 Jan 2024 09:08:34 +0900 Subject: [PATCH 1/7] =?UTF-8?q?Feat:=20=ED=98=84=20=EA=B8=B0=EC=88=98?= =?UTF-8?q?=EB=A5=BC=2013=20->=2014=EB=A1=9C=20=EC=88=98=EC=A0=95=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecruitingOpenHero/RecruitingOpenHero.component.tsx | 4 ++-- src/constants/application.ts | 2 +- src/constants/team.ts | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/home/RecruitingOpenHero/RecruitingOpenHero.component.tsx b/src/components/home/RecruitingOpenHero/RecruitingOpenHero.component.tsx index 897899c..340a71d 100644 --- a/src/components/home/RecruitingOpenHero/RecruitingOpenHero.component.tsx +++ b/src/components/home/RecruitingOpenHero/RecruitingOpenHero.component.tsx @@ -3,7 +3,7 @@ import DoubleUnderline from '@/assets/svg/double-underline.svg'; import GenerationRight from '@/assets/images/generation-right-2x.png'; import Image from 'next/image'; import { RecruitingPeriodDesktop, Lottie } from '@/components'; -import { AOS_BASE_DURATION_DISTANCE, AOS_DEFAULT_DURATION } from '@/constants'; +import { AOS_BASE_DURATION_DISTANCE, AOS_DEFAULT_DURATION, CURRENT_GENERATION } from '@/constants'; import * as Styled from './RecruitingOpenHero.styled'; const RecruitingOpenHero = () => { @@ -18,7 +18,7 @@ const RecruitingOpenHero = () => { data-aos="fade-up" data-aos-duration={AOS_DEFAULT_DURATION + AOS_BASE_DURATION_DISTANCE} > - 13th + {CURRENT_GENERATION}th = { From 44c9e2bd37931498c6dfd2ca8b8575e197735f8f Mon Sep 17 00:00:00 2001 From: HaJunRyu Date: Sat, 20 Jan 2024 09:12:52 +0900 Subject: [PATCH 2/7] =?UTF-8?q?Feat:=20index=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=9D=98=20=EB=AA=A8=EC=A7=91=EA=B8=B0=EA=B0=84=EC=9D=B4=20?= =?UTF-8?q?=EC=95=84=EB=8B=98=EC=9D=84=20=EC=95=8C=EB=A6=AC=EB=8A=94=20?= =?UTF-8?q?=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C=EA=B7=B8=EB=A5=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index ccd07f2..a7b0453 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -6,7 +6,6 @@ import { RecruitingOpenHero, RecruitingPeriod, RecruitingRemainder, - NotRecruitmentPeriod, } from '@/components'; import { useAOS } from '@/hooks'; @@ -17,7 +16,6 @@ import { useEffect, useState } from 'react'; const Home = () => { useAOS(); - const [isOpenNotRecruitMentModal, setIsOpenNotRecruitmentModal] = useState(true); const [recruitingProgressStatus, setRecruitingProgressStatus] = useState< RecruitingProgressStatus | 'NOT_INITIALIZED' >('NOT_INITIALIZED'); @@ -36,9 +34,6 @@ const Home = () => { - {isOpenNotRecruitMentModal && ( - - )} )} From cd08ca3659228bb376264ae2fe340982254f88bd Mon Sep 17 00:00:00 2001 From: HaJunRyu Date: Sat, 20 Jan 2024 09:36:56 +0900 Subject: [PATCH 3/7] =?UTF-8?q?Feat:=20=EB=AA=A8=EC=A7=91=EA=B8=B0?= =?UTF-8?q?=EA=B0=84=EC=9D=84=20=EC=83=81=EC=88=98=ED=99=94=ED=95=98?= =?UTF-8?q?=EB=A9=B0=2014=EA=B8=B0=20=EB=AA=A8=EC=A7=91=EA=B8=B0=EA=B0=84?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EA=B0=92=EC=9D=84=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=ED=95=9C=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecruitingRemainder.component.tsx | 11 ++++-- src/constants/index.ts | 1 + src/constants/recruit.ts | 7 ++++ src/utils/date.ts | 37 ++++++++----------- 4 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 src/constants/recruit.ts diff --git a/src/components/home/RecruitingRemainder/RecruitingRemainder.component.tsx b/src/components/home/RecruitingRemainder/RecruitingRemainder.component.tsx index f8a3e95..4fb0cab 100644 --- a/src/components/home/RecruitingRemainder/RecruitingRemainder.component.tsx +++ b/src/components/home/RecruitingRemainder/RecruitingRemainder.component.tsx @@ -1,17 +1,17 @@ import { useRouter } from 'next/router'; import { useInterval } from '@/hooks'; -import { getDifferenceOfDates, RECRUITMENT_START_KST_DATE } from '@/utils/date'; +import { getDifferenceOfDates } from '@/utils/date'; import type { DateDifference } from '@/utils/date'; import { useState, useEffect } from 'react'; -import { CURRENT_GENERATION } from '@/constants'; +import { CURRENT_GENERATION, RECRUIT_DATE } from '@/constants'; import * as Styled from './RecruitingRemainder.styled'; const RecruitingRemainder = () => { const router = useRouter(); const [difference, setDifference] = useState(() => - getDifferenceOfDates(new Date(), RECRUITMENT_START_KST_DATE), + getDifferenceOfDates(new Date(), RECRUIT_DATE.RECRUITMENT_START_KST_DATE), ); const [isPreviousDayOfRecruitingStart, isRunOutTimeOfRecruitingStart] = [ @@ -21,7 +21,10 @@ const RecruitingRemainder = () => { useInterval( () => { - const currentDifference = getDifferenceOfDates(new Date(), RECRUITMENT_START_KST_DATE); + const currentDifference = getDifferenceOfDates( + new Date(), + RECRUIT_DATE.RECRUITMENT_START_KST_DATE, + ); setDifference(currentDifference); }, isPreviousDayOfRecruitingStart ? 1000 : null, diff --git a/src/constants/index.ts b/src/constants/index.ts index 4892ebc..60c497f 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -4,3 +4,4 @@ export * from './team'; export * from './platform'; export * from './aos'; export * from './application'; +export * from './recruit'; diff --git a/src/constants/recruit.ts b/src/constants/recruit.ts new file mode 100644 index 0000000..d1d0a7c --- /dev/null +++ b/src/constants/recruit.ts @@ -0,0 +1,7 @@ +export const RECRUIT_DATE = { + RECRUITMENT_START_KST_DATE: new Date('2024-01-29T01:00:00+09:00'), // 서류 접수 시작 + RECRUITMENT_END_KST_DATE: new Date('2024-02-14T23:59:59+09:00'), // 서류 접수 종료 + SCREENING_RESULT_ANNOUNCED_KST_DATE: new Date('2024-02-20T21:00:00+09:00'), // 서류 결과 발표 + INTERVIEW_RESULT_ANNOUNCED_KST_DATE: new Date('2024-02-28T21:00:00+09:00'), // 최종 합격 발표 + AFTER_FIRST_SEMINAR_JOIN_KST_DATE: new Date('2024-03-09T17:00:00+09:00'), // 첫번째 세미나 끝나는 시각 +} as const; diff --git a/src/utils/date.ts b/src/utils/date.ts index 87c86e1..13d35ea 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -1,22 +1,9 @@ import { KeyOf } from '@/types'; +import { RECRUIT_DATE } from '@/constants'; import { objectKeys } from './object'; const DAYS = ['일', '월', '화', '수', '목', '금', '토']; -export const [ - RECRUITMENT_START_KST_DATE, // 서류 접수 시작 - RECRUITMENT_END_KST_DATE, // 서류 접수 종료 - SCREENING_RESULT_ANNOUNCED_KST_DATE, // 서류 결과 발표 - INTERVIEW_RESULT_ANNOUNCED_KST_DATE, // 최종 합격 발표 - AFTER_FIRST_SEMINAR_JOIN_KST_DATE, // 첫번째 세미나 끝나는 시각 -] = [ - new Date('2023-01-11T01:00:00+09:00'), - new Date('2023-01-25T23:59:59+09:00'), - new Date('2023-01-30T21:00:00+09:00'), - new Date('2023-02-07T21:00:00+09:00'), - new Date('2023-02-11T17:00:00+09:00'), -]; - export type RecruitingProgressStatus = | 'PREVIOUS' | 'IN-RECRUITING' // 지원하기 버튼 enabled @@ -38,28 +25,34 @@ export const getRecruitingProgressStatusFromRecruitingPeriod = ( const kstDate = getKSTDateFromDate(date); const currentDate = date.getTime() === kstDate.getTime() ? date : kstDate; - if (currentDate < RECRUITMENT_START_KST_DATE) { + if (currentDate < RECRUIT_DATE.RECRUITMENT_START_KST_DATE) { return 'PREVIOUS'; } - if (RECRUITMENT_START_KST_DATE <= currentDate && currentDate <= RECRUITMENT_END_KST_DATE) { + if ( + RECRUIT_DATE.RECRUITMENT_START_KST_DATE <= currentDate && + currentDate <= RECRUIT_DATE.RECRUITMENT_END_KST_DATE + ) { return 'IN-RECRUITING'; } - if (RECRUITMENT_END_KST_DATE < currentDate && currentDate < SCREENING_RESULT_ANNOUNCED_KST_DATE) { + if ( + RECRUIT_DATE.RECRUITMENT_END_KST_DATE < currentDate && + currentDate < RECRUIT_DATE.SCREENING_RESULT_ANNOUNCED_KST_DATE + ) { return 'END-RECRUITING'; } if ( - SCREENING_RESULT_ANNOUNCED_KST_DATE <= currentDate && - currentDate < INTERVIEW_RESULT_ANNOUNCED_KST_DATE + RECRUIT_DATE.SCREENING_RESULT_ANNOUNCED_KST_DATE <= currentDate && + currentDate < RECRUIT_DATE.INTERVIEW_RESULT_ANNOUNCED_KST_DATE ) { return 'AFTER-SCREENING-ANNOUNCED'; } if ( - INTERVIEW_RESULT_ANNOUNCED_KST_DATE <= currentDate && - currentDate < AFTER_FIRST_SEMINAR_JOIN_KST_DATE + RECRUIT_DATE.INTERVIEW_RESULT_ANNOUNCED_KST_DATE <= currentDate && + currentDate < RECRUIT_DATE.AFTER_FIRST_SEMINAR_JOIN_KST_DATE ) { return 'AFTER-INTERVIEWING-ANNOUNCED'; } - if (AFTER_FIRST_SEMINAR_JOIN_KST_DATE <= currentDate) { + if (RECRUIT_DATE.AFTER_FIRST_SEMINAR_JOIN_KST_DATE <= currentDate) { return 'AFTER-FIRST-SEMINAR'; } return 'INVALID'; From c0cf9d2076456abafa5138d8f3b5ea19ae3ed727 Mon Sep 17 00:00:00 2001 From: HaJunRyu Date: Sat, 20 Jan 2024 23:16:53 +0900 Subject: [PATCH 4/7] =?UTF-8?q?Feat:=20index=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=9D=98=20=EB=AA=A8=EC=A7=91=20=EC=9D=BC=EC=A0=95=EC=9D=84=20?= =?UTF-8?q?=EC=83=81=EC=88=98=ED=99=94=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../RecruitingPeriod.component.tsx | 24 ++-- .../RecruitingPeriodDesktop.component.tsx | 24 ++-- .../RecruitingProcess.component.tsx | 110 ++++++++++++++---- src/constants/date.ts | 1 + src/constants/index.ts | 1 + src/constants/recruit.ts | 2 + src/utils/date.ts | 4 +- yarn.lock | 5 + 9 files changed, 135 insertions(+), 37 deletions(-) create mode 100644 src/constants/date.ts diff --git a/package.json b/package.json index 0e8daac..b35068a 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@next/bundle-analyzer": "^12.1.0", "aos": "^3.0.0-beta.6", "axios": "^0.26.0", + "dayjs": "^1.11.10", "editorjs-html": "^3.4.3", "lodash-es": "^4.17.21", "lottie-web": "^5.9.1", diff --git a/src/components/home/RecruitingPeriod/RecruitingPeriod.component.tsx b/src/components/home/RecruitingPeriod/RecruitingPeriod.component.tsx index 88dd68e..6c56c64 100644 --- a/src/components/home/RecruitingPeriod/RecruitingPeriod.component.tsx +++ b/src/components/home/RecruitingPeriod/RecruitingPeriod.component.tsx @@ -1,20 +1,28 @@ import { Lottie, ScreenReaderOnly } from '@/components'; -import { AOS_BASE_DURATION_DISTANCE, AOS_DEFAULT_DURATION } from '@/constants'; +import { AOS_BASE_DURATION_DISTANCE, AOS_DEFAULT_DURATION, RECRUIT_DATE } from '@/constants'; import computerLottie from '@/assets/lottie/computer.json'; import PeriodArrow from '@/assets/svg/period-arrow.svg'; import fireLottie from '@/assets/lottie/fire.json'; +import dayjs from 'dayjs'; import * as Styled from './RecruitingPeriod.styled'; const RecruitingPeriod = () => { + const { RECRUITMENT_START_KST_DATE, RECRUITMENT_END_KST_DATE } = RECRUIT_DATE; + + const DAYJS_RECRUITMENT_START_KST_DATE = dayjs(RECRUITMENT_START_KST_DATE); + const DAYJS_RECRUITMENT_END_KST_DATE = dayjs(RECRUITMENT_END_KST_DATE); + return ( Start Date - 2023년 1월 11일 - @@ -24,9 +32,11 @@ const RecruitingPeriod = () => { data-aos-duration={AOS_DEFAULT_DURATION + AOS_BASE_DURATION_DISTANCE} > End Date - 2023년 1월 25일 - - 상세일정 이메일 확인 + 상세일정 이메일로 전달 최종 합격 발표 From c69f554c00fc5574545b48880d33c56b360146db Mon Sep 17 00:00:00 2001 From: HaJunRyu Date: Sun, 21 Jan 2024 22:43:25 +0900 Subject: [PATCH 6/7] =?UTF-8?q?Feat:=20Footer=EC=97=90=20=ED=91=9C?= =?UTF-8?q?=EA=B8=B0=EB=90=9C=20=EB=85=84=EB=8F=84=EB=A5=BC=202024?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Footer/Footer.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/Footer/Footer.component.tsx b/src/components/common/Footer/Footer.component.tsx index 0225c3a..9c4081f 100644 --- a/src/components/common/Footer/Footer.component.tsx +++ b/src/components/common/Footer/Footer.component.tsx @@ -19,7 +19,7 @@ const Footer = () => { - © Mash-Up 2023. Made in Seoul. + © Mash-Up 2024. Made in Seoul. Date: Sun, 21 Jan 2024 22:44:01 +0900 Subject: [PATCH 7/7] =?UTF-8?q?Feat:=20=EB=AA=A8=EC=A7=91=EA=B3=B5?= =?UTF-8?q?=EA=B3=A0=20=EB=B0=94=ED=85=80=EB=84=A4=EB=B9=84=EA=B2=8C?= =?UTF-8?q?=EC=9D=B4=EC=85=98=EC=9D=98=20=EB=AA=A8=EC=A7=91=EC=9D=BC?= =?UTF-8?q?=EC=9D=84=20=EC=83=81=EC=88=98=EB=A5=BC=20=EC=9D=B4=EC=9A=A9?= =?UTF-8?q?=ED=95=B4=20=EB=A0=8C=EB=8D=94=EB=A7=81=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecruitDate/RecruitDate.component.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/recruit/RecruitDate/RecruitDate.component.tsx b/src/components/recruit/RecruitDate/RecruitDate.component.tsx index 39b8ccb..d28d76f 100644 --- a/src/components/recruit/RecruitDate/RecruitDate.component.tsx +++ b/src/components/recruit/RecruitDate/RecruitDate.component.tsx @@ -1,10 +1,22 @@ +import { RECRUIT_DATE } from '@/constants'; +import dayjs from 'dayjs'; import * as Styled from './RecruitDate.styled'; const RecruitDate = () => { + const { RECRUITMENT_START_KST_DATE, RECRUITMENT_END_KST_DATE } = RECRUIT_DATE; + + const DAYJS_RECRUITMENT_START_KST_DATE = dayjs(RECRUITMENT_START_KST_DATE); + const DAYJS_RECRUITMENT_END_KST_DATE = dayjs(RECRUITMENT_END_KST_DATE); + return ( -  ~  - + +  ~  + ); };