From 969a91a0b6b4428f0ba375d2a5abd6d002bfc776 Mon Sep 17 00:00:00 2001 From: izone00 Date: Tue, 16 Apr 2024 18:02:21 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20=ED=8C=8C=ED=8B=B0=EC=83=9D=EC=84=9C?= =?UTF-8?q?=EC=8B=9C=20=EB=A7=88=EA=B0=90=EA=B8=B0=ED=95=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/party/PartyCreate.tsx | 11 ++++++++--- hooks/party/usePartyForm.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/party/PartyCreate.tsx b/components/party/PartyCreate.tsx index b6926b37b..96db85dc0 100644 --- a/components/party/PartyCreate.tsx +++ b/components/party/PartyCreate.tsx @@ -1,9 +1,9 @@ import { useRouter } from 'next/router'; import { FormEvent, useState } from 'react'; import { useSetRecoilState } from 'recoil'; -import { FaTimes } from 'react-icons/fa'; import { PartyCategory, PartyCreateForm } from 'types/partyTypes'; import { instance } from 'utils/axios'; +import { getFormattedDateToString } from 'utils/handleTime'; import { toastState } from 'utils/recoil/toast'; import { customTemplate, @@ -128,6 +128,9 @@ function DetailCustomization({ minute: 0, }); const [isSubmitting, setIsSubmitting] = useState(false); + const dueDate = getFormattedDateToString( + new Date(Date.now() + partyForm.openPeriod * 60 * 1000) + ); function handleOpenPeriod(period: { hour: number; minute: number }) { setOpenPeriod(period); @@ -258,7 +261,9 @@ function DetailCustomization({ ))}
분 후
-
23시 34분 마감
+
+ {dueDate.hour}시 {dueDate.min}분 마감 +