diff --git a/apps/member/src/components/calendar/CalendarSchedule/CalendarSchedule.tsx b/apps/member/src/components/calendar/CalendarSchedule/CalendarSchedule.tsx index 486f1227..50ea169a 100644 --- a/apps/member/src/components/calendar/CalendarSchedule/CalendarSchedule.tsx +++ b/apps/member/src/components/calendar/CalendarSchedule/CalendarSchedule.tsx @@ -5,14 +5,19 @@ import { useCallback } from 'react'; import { cn } from '@utils/string'; import dayjs from 'dayjs'; +interface CalendarScheduleProps extends ScheduleItem { + day: dayjs.Dayjs; +} + const CalendarSchedule = ({ + day, title, detail, startDate, endDate, -}: ScheduleItem) => { +}: CalendarScheduleProps) => { const { openModal } = useModal(); - const isSameDate = dayjs(startDate).isSame(endDate, 'date'); + const isDateDiff = dayjs(startDate).diff(endDate, 'd'); const handleScheduleClick = useCallback( (detail: string, start: string, end: string) => { @@ -32,9 +37,24 @@ const CalendarSchedule = ({ return (
{events[day.format('YYYY-MM-DD')]?.map((event) => ( -