From 40d045b4982cf4c78c14eca73bf944333be50c7f Mon Sep 17 00:00:00 2001 From: caadiq Date: Sat, 18 Apr 2026 11:54:21 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A2=85=EB=A3=8C=20=EC=9E=84=EB=B0=95=20?= =?UTF-8?q?=EB=B0=B0=EC=A7=80/=EB=82=A0=EC=A7=9C=20=ED=91=9C=EA=B8=B0=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 종료 배지 'D-N' → '종료 N일 전' (시작 배지와 표현 통일) - 이벤트 기간이 하루인 경우 '5/10 ~ 5/10' → '5/10' 단일 표기 Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/NoticeWidget.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/NoticeWidget.jsx b/frontend/src/components/NoticeWidget.jsx index 9cfc401..6de2544 100644 --- a/frontend/src/components/NoticeWidget.jsx +++ b/frontend/src/components/NoticeWidget.jsx @@ -58,7 +58,7 @@ function dayBadge(item, cfg) { if (end) { const d = Math.ceil((end - now) / 86400000) if (d <= 0) return null - return { label: `D-${d}`, tone: 'amber' } + return { label: `종료 ${d}일 전`, tone: 'amber' } } if (item.ongoing_flag === 'true' || item.ongoing_flag === true) { return { label: '상시판매', tone: 'gray' } @@ -223,10 +223,12 @@ function CardItem({ item, cfg }) { const badge = dayBadge(item, cfg) const start = item[cfg.dateStartKey] const end = item[cfg.dateEndKey] + const startMD = fmtMD(start || item.date) + const endMD = fmtMD(end || item.date) const dateText = (item.ongoing_flag === 'true' || item.ongoing_flag === true) ? '상시판매' : start || end - ? `${fmtMD(start || item.date)} ~ ${fmtMD(end || item.date)}` + ? (startMD === endMD ? startMD : `${startMD} ~ ${endMD}`) : fmtYMD(item.date) const badgeBg = { emerald: 'var(--badge-emerald-bg)',