Skip to content

Commit

Permalink
[KAN-129] fix: 모임 상세페이지 날짜 표현 형식 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
HMRyu committed Oct 16, 2024
1 parent 602b397 commit ed36e40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useState } from 'react';

interface GatheringImageProps {
image: string;
endTime?: string;
endTime: string;
}

const GatheringImage = ({ image, endTime }: GatheringImageProps) => {
Expand Down
6 changes: 4 additions & 2 deletions src/utils/getTagMessage.ts
Original file line number Diff line number Diff line change
@@ -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}일 후 마감`;
}
Expand Down

0 comments on commit ed36e40

Please sign in to comment.