File tree Expand file tree Collapse file tree 5 files changed +47
-27
lines changed
components/organisms/home Expand file tree Collapse file tree 5 files changed +47
-27
lines changed Original file line number Diff line number Diff line change 11'use client' ;
22
3- import dynamic from 'next/dynamic' ;
4-
53import { sendGAEvent } from '@next/third-parties/google' ;
64
75import Button from '@/components/molecules/Button' ;
6+ import RecruitmentSummary from '@/components/organisms/home/RecruitmentSummary' ;
87import useCopy from '@/hook/useCopyToClipboard' ;
98import { displayApplication , getCurrentStatus } from '@/libs/utils/recruit' ;
109
1110import styles from './index.module.scss' ;
1211
13- const RecruitmentSummary = dynamic (
14- ( ) => import ( '@/components/organisms/home/RecruitmentSummary' ) ,
15- { ssr : false } ,
16- ) ;
17-
1812function RecruitmentStatusSection ( ) {
1913 const now = Date . now ( ) ;
2014 const currentStatus = getCurrentStatus ( now ) ;
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change @@ -3,34 +3,48 @@ import SummaryCard from '@/components/organisms/home/SummaryCards';
33import useTimer from '@/hook/useTimer' ;
44import { displayApplication } from '@/libs/utils/recruit' ;
55
6+ import styles from './index.module.scss' ;
7+
68type Props = {
79 currentStatus : 'before' | 'ongoing' | 'after' ;
810} ;
911
1012function 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
3650export default RecruitmentSummary ;
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import styles from './index.module.scss';
22
33const summaryData = [
44 { title : '누적 지원자 수' , value : '400+' } ,
5- { title : '총 참여자 수' , value : '60+ ' } ,
6- { title : '누적 미션 수' , value : '30+ ' } ,
5+ { title : '총 참여자 수' , value : '101 ' } ,
6+ { title : '누적 미션 수' , value : '51 ' } ,
77] ;
88
99function SummaryCards ( ) {
Original file line number Diff line number Diff line change 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
99export const Applicants = [
1010 {
You can’t perform that action at this time.
0 commit comments