From b0748ab138f6770aaa4cd25e77bd09f113823540 Mon Sep 17 00:00:00 2001 From: chasyuss Date: Wed, 7 Jan 2026 16:27:17 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20(SRLT-127)=20=EB=9E=9C=EB=94=A9=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EB=AA=A8=EC=85=98=20=EA=B0=80=EC=9A=B4?= =?UTF-8?q?=EB=8D=B0=20=EC=A0=95=EB=A0=AC=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/landing/LandingChecklist.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/_components/landing/LandingChecklist.tsx b/src/app/_components/landing/LandingChecklist.tsx index e87109d..6eaeed4 100644 --- a/src/app/_components/landing/LandingChecklist.tsx +++ b/src/app/_components/landing/LandingChecklist.tsx @@ -6,8 +6,8 @@ import { useRouter } from 'next/navigation'; const LandingChecklist = () => { const router = useRouter(); return ( -
-
+
+

2026년 지원사업,
From d1a4eb6ad08fa2c32fee1c0b1f24fe8bd7404ad9 Mon Sep 17 00:00:00 2001 From: chasyuss Date: Wed, 7 Jan 2026 18:37:31 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20(SRLT-127)=20=EB=9E=9C=EB=94=A9=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EB=AA=A8=EC=85=98=20=ED=83=80=EC=9D=B4?= =?UTF-8?q?=EB=A8=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/landing/LandingChecklist.tsx | 15 ++++++-- src/hooks/useCountdown.ts | 38 +++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 src/hooks/useCountdown.ts diff --git a/src/app/_components/landing/LandingChecklist.tsx b/src/app/_components/landing/LandingChecklist.tsx index 6eaeed4..6c62730 100644 --- a/src/app/_components/landing/LandingChecklist.tsx +++ b/src/app/_components/landing/LandingChecklist.tsx @@ -2,9 +2,12 @@ import Image from 'next/image'; import ArrowIcon from '@/assets/icons/chevron_right.svg'; import { useRouter } from 'next/navigation'; +import { useCountdown } from '@/hooks/useCountdown'; const LandingChecklist = () => { const router = useRouter(); + const timeLeft = useCountdown('2026-02-28T23:59:59'); + return (
@@ -20,12 +23,18 @@ const LandingChecklist = () => {

- {['10일', '4시간', '19분', '20초'].map((time) => ( + {[ + { value: timeLeft.days, label: '일' }, + { value: timeLeft.hours, label: '시간' }, + { value: timeLeft.minutes, label: '분' }, + { value: timeLeft.seconds, label: '초' }, + ].map((item, index) => (
- {time} + {item.value} + {item.label}
))}
diff --git a/src/hooks/useCountdown.ts b/src/hooks/useCountdown.ts new file mode 100644 index 0000000..7a1c41a --- /dev/null +++ b/src/hooks/useCountdown.ts @@ -0,0 +1,38 @@ +import { useState, useEffect } from 'react'; + +export const useCountdown = (targetDate: string) => { + const [timeLeft, setTimeLeft] = useState({ + days: 0, + hours: 0, + minutes: 0, + seconds: 0, + }); + + useEffect(() => { + const target = new Date(targetDate).getTime(); + + const updateTimer = () => { + const now = Date.now(); + const diff = target - now; + + if (diff > 0) { + setTimeLeft({ + days: Math.floor(diff / (1000 * 60 * 60 * 24)), + hours: Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)), + minutes: Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)), + seconds: Math.floor((diff % (1000 * 60)) / 1000), + }); + } else { + setTimeLeft({ days: 0, hours: 0, minutes: 0, seconds: 0 }); + } + }; + + updateTimer(); + const interval = setInterval(updateTimer, 1000); + + return () => clearInterval(interval); + }, [targetDate]); + + return timeLeft; +}; + From 0d2d7695e314a047439235ccce5bf630b8a98106 Mon Sep 17 00:00:00 2001 From: chasyuss Date: Wed, 7 Jan 2026 18:39:55 +0900 Subject: [PATCH 3/5] =?UTF-8?q?chore:=20(SRLT-127)=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EB=AA=A8=EC=85=98=20=EA=B8=B0=EA=B0=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/landing/LandingChecklist.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/_components/landing/LandingChecklist.tsx b/src/app/_components/landing/LandingChecklist.tsx index 6c62730..ac72c9c 100644 --- a/src/app/_components/landing/LandingChecklist.tsx +++ b/src/app/_components/landing/LandingChecklist.tsx @@ -19,7 +19,7 @@ const LandingChecklist = () => {

- 2026 지원사업 대비 모든 기능 무료 프로모션 (~1/10) + 2026 지원사업 대비 모든 기능 무료 프로모션 (~2/28)

From 26c4dc0c556d04c82bdf3a95c6c819f54c118e6c Mon Sep 17 00:00:00 2001 From: chasyuss Date: Wed, 7 Jan 2026 18:57:53 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20(SRLT-127)=20=ED=83=80=EC=9D=B4?= =?UTF-8?q?=EB=A8=B8=20SSR=20=ED=95=98=EC=9D=B4=EB=93=9C=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EB=B6=88=EC=9D=BC=EC=B9=98=20=EC=9C=84=ED=97=98=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useCountdown.ts | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/hooks/useCountdown.ts b/src/hooks/useCountdown.ts index 7a1c41a..2c6f2e7 100644 --- a/src/hooks/useCountdown.ts +++ b/src/hooks/useCountdown.ts @@ -1,12 +1,28 @@ import { useState, useEffect } from 'react'; +const calculateTimeLeft = (targetDate: string) => { + if (typeof window === 'undefined') { + return { days: 0, hours: 0, minutes: 0, seconds: 0 }; + } + + const target = new Date(targetDate).getTime(); + const now = Date.now(); + const diff = target - now; + + if (diff > 0) { + return { + days: Math.floor(diff / (1000 * 60 * 60 * 24)), + hours: Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)), + minutes: Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)), + seconds: Math.floor((diff % (1000 * 60)) / 1000), + }; + } + + return { days: 0, hours: 0, minutes: 0, seconds: 0 }; +}; + export const useCountdown = (targetDate: string) => { - const [timeLeft, setTimeLeft] = useState({ - days: 0, - hours: 0, - minutes: 0, - seconds: 0, - }); + const [timeLeft, setTimeLeft] = useState(() => calculateTimeLeft(targetDate)); useEffect(() => { const target = new Date(targetDate).getTime(); @@ -35,4 +51,3 @@ export const useCountdown = (targetDate: string) => { return timeLeft; }; - From f2929963123c962177fa64f4157f9a458f75e81d Mon Sep 17 00:00:00 2001 From: chasyuss Date: Wed, 7 Jan 2026 19:03:33 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20(SRLT-127)=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useCountdown.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/hooks/useCountdown.ts b/src/hooks/useCountdown.ts index 2c6f2e7..ea9b1bc 100644 --- a/src/hooks/useCountdown.ts +++ b/src/hooks/useCountdown.ts @@ -25,22 +25,8 @@ export const useCountdown = (targetDate: string) => { const [timeLeft, setTimeLeft] = useState(() => calculateTimeLeft(targetDate)); useEffect(() => { - const target = new Date(targetDate).getTime(); - const updateTimer = () => { - const now = Date.now(); - const diff = target - now; - - if (diff > 0) { - setTimeLeft({ - days: Math.floor(diff / (1000 * 60 * 60 * 24)), - hours: Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)), - minutes: Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)), - seconds: Math.floor((diff % (1000 * 60)) / 1000), - }); - } else { - setTimeLeft({ days: 0, hours: 0, minutes: 0, seconds: 0 }); - } + setTimeLeft(calculateTimeLeft(targetDate)); }; updateTimer();