Skip to content

Commit cac86ff

Browse files
authored
Merge pull request #115 from sipe-team/feat/main-for-4th
Feat/main for 4th
2 parents c941166 + ceda54b commit cac86ff

File tree

5 files changed

+47
-27
lines changed

5 files changed

+47
-27
lines changed

src/components/organisms/home/RecruitmentStatusSection/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
'use client';
22

3-
import dynamic from 'next/dynamic';
4-
53
import { sendGAEvent } from '@next/third-parties/google';
64

75
import Button from '@/components/molecules/Button';
6+
import RecruitmentSummary from '@/components/organisms/home/RecruitmentSummary';
87
import useCopy from '@/hook/useCopyToClipboard';
98
import { displayApplication, getCurrentStatus } from '@/libs/utils/recruit';
109

1110
import styles from './index.module.scss';
1211

13-
const RecruitmentSummary = dynamic(
14-
() => import('@/components/organisms/home/RecruitmentSummary'),
15-
{ ssr: false },
16-
);
17-
1812
function RecruitmentStatusSection() {
1913
const now = Date.now();
2014
const currentStatus = getCurrentStatus(now);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.timerWrapper {
2+
display: flex;
3+
flex-direction: column;
4+
align-items: center;
5+
gap: 1rem;
6+
7+
.timerDescription {
8+
font-size: 1.4rem;
9+
font-weight: 500;
10+
color: #fff;
11+
}
12+
}

src/components/organisms/home/RecruitmentSummary/index.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,48 @@ import SummaryCard from '@/components/organisms/home/SummaryCards';
33
import useTimer from '@/hook/useTimer';
44
import { displayApplication } from '@/libs/utils/recruit';
55

6+
import styles from './index.module.scss';
7+
68
type Props = {
79
currentStatus: 'before' | 'ongoing' | 'after';
810
};
911

1012
function RecruitmentSummary({ currentStatus }: Props) {
11-
const isRecruiting = currentStatus !== 'after';
1213
const currentApplicationDetail = displayApplication[currentStatus];
13-
1414
const { dates, hours, minutes, seconds } = useTimer(
1515
currentApplicationDetail?.dueDate,
16-
isRecruiting ? 1000 : null,
16+
1000,
1717
);
1818

19-
return (
20-
<>
21-
{currentStatus === 'after' ? (
22-
<SummaryCard />
23-
) : (
19+
const elements = {
20+
before: () => (
21+
<div className={styles.timerWrapper}>
22+
<div className={styles.timerDescription}>모집 시작까지</div>
2423
<Timer
2524
dates={dates}
2625
hours={hours}
2726
minutes={minutes}
2827
seconds={seconds}
29-
isRecruiting={isRecruiting}
28+
isRecruiting={true}
3029
/>
31-
)}
32-
</>
33-
);
30+
</div>
31+
),
32+
ongoing: () => (
33+
<div className={styles.timerWrapper}>
34+
<div className={styles.timerDescription}>모집 마감까지</div>
35+
<Timer
36+
dates={dates}
37+
hours={hours}
38+
minutes={minutes}
39+
seconds={seconds}
40+
isRecruiting={true}
41+
/>
42+
</div>
43+
),
44+
after: () => <SummaryCard />,
45+
};
46+
47+
return elements[currentStatus]();
3448
}
3549

3650
export default RecruitmentSummary;

src/components/organisms/home/SummaryCards/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import styles from './index.module.scss';
22

33
const summaryData = [
44
{ title: '누적 지원자 수', value: '400+' },
5-
{ title: '총 참여자 수', value: '60+' },
6-
{ title: '누적 미션 수', value: '30+' },
5+
{ title: '총 참여자 수', value: '101' },
6+
{ title: '누적 미션 수', value: '51' },
77
];
88

99
function SummaryCards() {

src/libs/constants/recruit.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
export const CURRENT_GENERATION = 3;
2-
export const APPLICATION_START_DATE = new Date('2024-09-08 00:00:00');
3-
export const APPLICATION_DUE_DATE = new Date('2024-09-22 23:59:59');
1+
export const CURRENT_GENERATION = 4;
2+
export const APPLICATION_START_DATE = new Date('2025-03-11 00:00:00');
3+
export const APPLICATION_DUE_DATE = new Date('2025-03-23 23:59:59');
44

5-
export const JOIN_FORM_URL = 'https://forms.gle/D1ZsAb48whk1HB8J7';
6-
export const JOIN_ALARM_FORM_URL = 'https://forms.gle/K2DiBkmJbhSM7MAx9';
7-
export const JOIN_NEXT_ALARM_FORM_URL = 'https://forms.gle/vgvMiG2pkoJvWfbZA';
5+
export const JOIN_FORM_URL = 'https://forms.gle/SPM3xXTVrnvupcLDA';
6+
export const JOIN_ALARM_FORM_URL = 'https://forms.gle/q9wdvKhEyZmTZGS97';
7+
export const JOIN_NEXT_ALARM_FORM_URL = 'https://forms.gle/VS7Ap4xfSyf2qYqQ6';
88

99
export const Applicants = [
1010
{

0 commit comments

Comments
 (0)