diff --git a/frontend/src/pages/mobile/public/Schedule.jsx b/frontend/src/pages/mobile/public/Schedule.jsx index dd7fadc..8803bfb 100644 --- a/frontend/src/pages/mobile/public/Schedule.jsx +++ b/frontend/src/pages/mobile/public/Schedule.jsx @@ -591,16 +591,21 @@ function ScheduleCard({ schedule, categoryColor, categories, delay = 0 }) { const memberNames = schedule.member_names || schedule.members?.map(m => m.name).join(',') || ''; const memberList = memberNames.split(',').filter(name => name.trim()); - // 날짜 포맷팅 - const formatDate = (dateStr) => { - if (!dateStr) return ''; + // 날짜 파싱 + const parseDate = (dateStr) => { + if (!dateStr) return null; const date = new Date(dateStr); + const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); const weekdays = ['일', '월', '화', '수', '목', '금', '토']; const weekday = weekdays[date.getDay()]; - return `${month}.${day} (${weekday})`; + const isWeekend = date.getDay() === 0 || date.getDay() === 6; + const isSunday = date.getDay() === 0; + return { year, month, day, weekday, isWeekend, isSunday }; }; + + const dateInfo = parseDate(schedule.date); return ( {/* 카드 본체 */}
-
- - {/* 날짜 및 시간 뱃지 */} -
- {/* 날짜 뱃지 */} -
- {formatDate(schedule.date)} -
- {/* 시간 뱃지 */} - {schedule.time && ( -
- - {schedule.time.slice(0, 5)} +
+ {/* 왼쪽 날짜 영역 */} + {dateInfo && ( +
+ {dateInfo.year} + {dateInfo.month}.{dateInfo.day} + + {dateInfo.weekday}요일 +
)} - {/* 카테고리 뱃지 */} - - {categoryName} - -
- - {/* 제목 */} -

- {decodeHtmlEntities(schedule.title)} -

- - {/* 출처 */} - {schedule.source_name && ( -
- - {schedule.source_name} -
- )} - - {/* 멤버 */} - {memberList.length > 0 && ( -
- {memberList.length >= 5 ? ( - - 프로미스나인 - - ) : ( - memberList.map((name, i) => ( - + {/* 시간 및 카테고리 뱃지 */} +
+ {schedule.time && ( +
- {name.trim()} - - )) + + {schedule.time.slice(0, 5)} +
+ )} + + {categoryName} + +
+ + {/* 제목 */} +

+ {decodeHtmlEntities(schedule.title)} +

+ + {/* 출처 */} + {schedule.source_name && ( +
+ + {schedule.source_name} +
+ )} + + {/* 멤버 */} + {memberList.length > 0 && ( +
+ {memberList.length >= 5 ? ( + + 프로미스나인 + + ) : ( + memberList.map((name, i) => ( + + {name.trim()} + + )) + )} +
)}
- )}