From ed36e4024fcdde178a0cc2f3f05200fadadb8326 Mon Sep 17 00:00:00 2001 From: Homin Date: Wed, 16 Oct 2024 16:07:08 +0900 Subject: [PATCH] =?UTF-8?q?[KAN-129]=20fix:=20=EB=AA=A8=EC=9E=84=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=20=ED=91=9C=ED=98=84=20=ED=98=95=EC=8B=9D=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(main)/gatherings/[id]/_component/GatheringImage.tsx | 2 +- src/utils/getTagMessage.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(main)/gatherings/[id]/_component/GatheringImage.tsx b/src/app/(main)/gatherings/[id]/_component/GatheringImage.tsx index 42973002..74791399 100644 --- a/src/app/(main)/gatherings/[id]/_component/GatheringImage.tsx +++ b/src/app/(main)/gatherings/[id]/_component/GatheringImage.tsx @@ -9,7 +9,7 @@ import { useState } from 'react'; interface GatheringImageProps { image: string; - endTime?: string; + endTime: string; } const GatheringImage = ({ image, endTime }: GatheringImageProps) => { diff --git a/src/utils/getTagMessage.ts b/src/utils/getTagMessage.ts index 9c38172c..dbea0c75 100644 --- a/src/utils/getTagMessage.ts +++ b/src/utils/getTagMessage.ts @@ -1,10 +1,12 @@ -const getTagMessage = (daysLeft: number | null, endTime?: string) => { +import { formatTimeHours } from './formatDate'; + +const getTagMessage = (daysLeft: number | null, endTime: string) => { if (daysLeft === null) return ''; if (daysLeft < 0) { return '마감된 모임입니다.'; } else if (daysLeft === 0) { - return `오늘 ${endTime}시 마감`; + return `오늘 ${formatTimeHours(endTime)}시 마감`; } else { return `${daysLeft}일 후 마감`; }