From d4ab2d64390779a30158c0c85f3e6661cb077696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=84=9C=EC=A4=80?= <104981505+xeoxxn@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:10:52 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=EB=B9=8C=EB=A6=B4=EA=B2=8C=20?= =?UTF-8?q?=EB=B0=98=EB=82=A9=20=EA=B8=B0=ED=95=9C=20=ED=91=9C=EA=B8=B0?= =?UTF-8?q?=EB=A5=BC=20=EC=98=A4=EB=8A=98/=EB=82=B4=EC=9D=BC/=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=EB=A1=9C=20=EA=B5=AC=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- .../components/BililgeReturnSection.tsx | 3 +- .../bililge/constants/bililgeReturns.ts | 39 +++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/features/bililge/components/BililgeReturnSection.tsx b/src/features/bililge/components/BililgeReturnSection.tsx index 178d0a1..443e9b9 100644 --- a/src/features/bililge/components/BililgeReturnSection.tsx +++ b/src/features/bililge/components/BililgeReturnSection.tsx @@ -11,6 +11,7 @@ import BililgeReturnToast from "@/features/bililge/components/BililgeReturnToast import { BILILGE_RENTAL_HISTORY, BILILGE_RETURN_ITEMS, + formatBililgeReturnDeadline, } from "@/features/bililge/constants/bililgeReturns"; // 토스트 자동 닫힘 시간 — Figma엔 지속시간이 없어서 WDS Toast의 duration="short" 기본값과 @@ -83,7 +84,7 @@ function BililgeReturnSection({ onBrowseRentals }: BililgeReturnSectionProps) { itemName={item.name} key={item.id} onRentRequest={() => setConfirmOpen(true)} - subtitle={`반납까지 ${item.hoursUntilDue}시간`} + subtitle={formatBililgeReturnDeadline(item.dueAt)} /> ))} diff --git a/src/features/bililge/constants/bililgeReturns.ts b/src/features/bililge/constants/bililgeReturns.ts index 33ca448..75b356d 100644 --- a/src/features/bililge/constants/bililgeReturns.ts +++ b/src/features/bililge/constants/bililgeReturns.ts @@ -7,14 +7,47 @@ export interface BililgeReturnItem { id: string; name: string; icon: string; - hoursUntilDue: number; + dueAt: Date; +} + +// 디자인 QA 페이지(nodeId 2849:56701 "변경필요")에서 반납 기한 표기를 "반납까지 N시간"에서 +// 오늘/내일/그 이후로 구분한 상대 날짜 표기로 바꾸기로 했다 — 오늘이면 "{시}시까지", 내일이면 +// "내일까지", 모레(3일째)부터는 "{월}월 {일}일까지"로 날짜를 그대로 보여준다. 시각 비교는 +// 시(hour) 단위가 아니라 자정 기준 달력 일수 차이로 계산한다 — 밤 11시에 "28시간 뒤"가 +// 실제로는 모레인데 "내일"로 잘못 표시되는 걸 막기 위해서다. +export function formatBililgeReturnDeadline( + dueAt: Date, + now: Date = new Date(), +): string { + const startOfDay = (date: Date) => + new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime(); + const dayDiff = Math.round( + (startOfDay(dueAt) - startOfDay(now)) / (24 * 60 * 60 * 1000), + ); + + if (dayDiff <= 0) { + return `${dueAt.getHours()}시까지`; + } + if (dayDiff === 1) { + return "내일까지"; + } + return `${dueAt.getMonth() + 1}월 ${dueAt.getDate()}일까지`; +} + +// Figma 목데이터 기준 시각(오늘/내일)을 실행 시점의 실제 날짜에 맞춰 계산한다 — 날짜를 +// 하드코딩하면 시간이 지날수록 "오늘"·"내일" 표기가 어긋난다. +function atDaysFromNow(daysOffset: number, hour: number): Date { + const date = new Date(); + date.setDate(date.getDate() + daysOffset); + date.setHours(hour, 0, 0, 0); + return date; } // Figma: 빌릴게 반납 화면 Return Items Section (nodeId 1133:49979) 목데이터 — 실 API 연동 전까지 사용 export const BILILGE_RETURN_ITEMS: BililgeReturnItem[] = [ - { hoursUntilDue: 22, icon: umbrella, id: "umbrella", name: "우산" }, + { dueAt: atDaysFromNow(0, 17), icon: umbrella, id: "umbrella", name: "우산" }, { - hoursUntilDue: 4, + dueAt: atDaysFromNow(1, 12), icon: laptopCharger, id: "laptop-charger", name: "노트북 충전기", From 1f2f0bddd948ea47c8c2052e21ca469bb35b1c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=84=9C=EC=A4=80?= <104981505+xeoxxn@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:53:46 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=EB=B9=8C=EB=A6=B4=EA=B2=8C=20?= =?UTF-8?q?=EB=B0=98=EB=82=A9=20=ED=99=94=EB=A9=B4=20=EA=B8=B0=ED=95=9C=20?= =?UTF-8?q?=ED=91=9C=EA=B8=B0=EB=A5=BC=20=EC=9B=90=EB=9E=98=EB=8C=80?= =?UTF-8?q?=EB=A1=9C=20=EB=90=98=EB=8F=8C=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Figma에는 이 화면 대신 대여 바텀시트의 "대여할 물품" 카드에 오늘/내일/날짜 표기가 있었다 — 다음 커밋에서 올바른 위치에 반영한다. Co-Authored-By: Claude Sonnet 5 --- .../components/BililgeReturnSection.tsx | 3 +- .../bililge/constants/bililgeReturns.ts | 39 ++----------------- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/src/features/bililge/components/BililgeReturnSection.tsx b/src/features/bililge/components/BililgeReturnSection.tsx index 443e9b9..178d0a1 100644 --- a/src/features/bililge/components/BililgeReturnSection.tsx +++ b/src/features/bililge/components/BililgeReturnSection.tsx @@ -11,7 +11,6 @@ import BililgeReturnToast from "@/features/bililge/components/BililgeReturnToast import { BILILGE_RENTAL_HISTORY, BILILGE_RETURN_ITEMS, - formatBililgeReturnDeadline, } from "@/features/bililge/constants/bililgeReturns"; // 토스트 자동 닫힘 시간 — Figma엔 지속시간이 없어서 WDS Toast의 duration="short" 기본값과 @@ -84,7 +83,7 @@ function BililgeReturnSection({ onBrowseRentals }: BililgeReturnSectionProps) { itemName={item.name} key={item.id} onRentRequest={() => setConfirmOpen(true)} - subtitle={formatBililgeReturnDeadline(item.dueAt)} + subtitle={`반납까지 ${item.hoursUntilDue}시간`} /> ))} diff --git a/src/features/bililge/constants/bililgeReturns.ts b/src/features/bililge/constants/bililgeReturns.ts index 75b356d..33ca448 100644 --- a/src/features/bililge/constants/bililgeReturns.ts +++ b/src/features/bililge/constants/bililgeReturns.ts @@ -7,47 +7,14 @@ export interface BililgeReturnItem { id: string; name: string; icon: string; - dueAt: Date; -} - -// 디자인 QA 페이지(nodeId 2849:56701 "변경필요")에서 반납 기한 표기를 "반납까지 N시간"에서 -// 오늘/내일/그 이후로 구분한 상대 날짜 표기로 바꾸기로 했다 — 오늘이면 "{시}시까지", 내일이면 -// "내일까지", 모레(3일째)부터는 "{월}월 {일}일까지"로 날짜를 그대로 보여준다. 시각 비교는 -// 시(hour) 단위가 아니라 자정 기준 달력 일수 차이로 계산한다 — 밤 11시에 "28시간 뒤"가 -// 실제로는 모레인데 "내일"로 잘못 표시되는 걸 막기 위해서다. -export function formatBililgeReturnDeadline( - dueAt: Date, - now: Date = new Date(), -): string { - const startOfDay = (date: Date) => - new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime(); - const dayDiff = Math.round( - (startOfDay(dueAt) - startOfDay(now)) / (24 * 60 * 60 * 1000), - ); - - if (dayDiff <= 0) { - return `${dueAt.getHours()}시까지`; - } - if (dayDiff === 1) { - return "내일까지"; - } - return `${dueAt.getMonth() + 1}월 ${dueAt.getDate()}일까지`; -} - -// Figma 목데이터 기준 시각(오늘/내일)을 실행 시점의 실제 날짜에 맞춰 계산한다 — 날짜를 -// 하드코딩하면 시간이 지날수록 "오늘"·"내일" 표기가 어긋난다. -function atDaysFromNow(daysOffset: number, hour: number): Date { - const date = new Date(); - date.setDate(date.getDate() + daysOffset); - date.setHours(hour, 0, 0, 0); - return date; + hoursUntilDue: number; } // Figma: 빌릴게 반납 화면 Return Items Section (nodeId 1133:49979) 목데이터 — 실 API 연동 전까지 사용 export const BILILGE_RETURN_ITEMS: BililgeReturnItem[] = [ - { dueAt: atDaysFromNow(0, 17), icon: umbrella, id: "umbrella", name: "우산" }, + { hoursUntilDue: 22, icon: umbrella, id: "umbrella", name: "우산" }, { - dueAt: atDaysFromNow(1, 12), + hoursUntilDue: 4, icon: laptopCharger, id: "laptop-charger", name: "노트북 충전기", From a017f88a7479993d78e72bd211f5908a44ce3361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=84=9C=EC=A4=80?= <104981505+xeoxxn@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:53:52 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=EB=B9=8C=EB=A6=B4=EA=B2=8C=20?= =?UTF-8?q?=EB=8C=80=EC=97=AC=20=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20?= =?UTF-8?q?=EB=AC=BC=ED=92=88=20=EC=B9=B4=EB=93=9C=EC=97=90=20=EB=B0=98?= =?UTF-8?q?=EB=82=A9=20=EA=B8=B0=ED=95=9C=20=EB=9D=BC=EB=B2=A8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- .../bililge/components/BililgeRentalSheet.tsx | 6 +- .../bililge/constants/bililgeItems.ts | 133 ++++++++++++++++-- 2 files changed, 125 insertions(+), 14 deletions(-) diff --git a/src/features/bililge/components/BililgeRentalSheet.tsx b/src/features/bililge/components/BililgeRentalSheet.tsx index 719b737..93572a4 100644 --- a/src/features/bililge/components/BililgeRentalSheet.tsx +++ b/src/features/bililge/components/BililgeRentalSheet.tsx @@ -97,8 +97,12 @@ function BililgeRentalSheet({ item, open, onClose }: BililgeRentalSheetProps) { onStepperIncrease={() => setStepperValue((value) => Math.min(item.quantity, value + 1)) } + // Figma: 대여할 물품 카드(nodeId 1422:57184, 3013:114608)에 "수량 28 · 오늘 + // 17시까지 반납" / "수량 28 · 9/29까지 반납"처럼 수량 뒤에 반납 기한이 붙는다 — + // 기한 라벨(returnDeadlineLabel)은 서버가 오늘/내일/날짜를 미리 판단해 내려주는 + // 완성된 문자열이라 여기서는 이어붙이기만 한다. stepperValue={stepperValue} - subtitle={`수량 ${item.quantity}`} + subtitle={`수량 ${item.quantity} · ${item.returnDeadlineLabel}`} trailingControl="stepper" /> diff --git a/src/features/bililge/constants/bililgeItems.ts b/src/features/bililge/constants/bililgeItems.ts index 4f2f477..f188bda 100644 --- a/src/features/bililge/constants/bililgeItems.ts +++ b/src/features/bililge/constants/bililgeItems.ts @@ -19,57 +19,164 @@ export interface BililgeItem { name: string; quantity: number; icon: string; + // 대여 바텀시트의 "대여할 물품" 카드(Figma nodeId 1422:57184, 3013:114608)에 "수량 28 · + // {returnDeadlineLabel}"로 붙는 반납 기한 문구 — "오늘 17시까지 반납"/"9/29까지 반납"처럼 + // 오늘·내일·그 이후(월/일)를 서버가 이미 판단해서 내려주는 값이라 가정한다. 오늘/내일 여부는 + // 보는 사람의 로컬 시각 기준이라 프런트에서 계산하는 게 일반적이지만, 이 서비스는 같은 화면을 + // 웹과 앱이 각각 구현해야 해서 "오늘/내일 판단 기준"이 플랫폼마다 어긋나지 않도록 서버가 + // 라벨 문자열까지 계산해서 내려주기로 했다 — 그래서 이 필드는 프런트가 다시 가공하지 않고 + // 그대로 렌더링만 하는 완성된 문자열이다. + returnDeadlineLabel: string; +} + +// 목데이터는 실 서버가 없어 위 필드를 흉내내는 값이다 — 실행 시점 기준으로 오늘/내일/그 이후 +// 라벨을 미리 계산해두되, 컴포넌트 쪽에는 이 계산 로직 자체를 노출하지 않는다(export하지 않음). +// 실 API가 붙으면 이 함수와 호출부는 통째로 지우고 응답 필드를 그대로 쓰면 된다. +function mockReturnDeadlineLabel(daysFromNow: number, hour = 17): string { + if (daysFromNow <= 0) { + return `오늘 ${hour}시까지 반납`; + } + if (daysFromNow === 1) { + return "내일까지 반납"; + } + const date = new Date(); + date.setDate(date.getDate() + daysFromNow); + return `${date.getMonth() + 1}/${date.getDate()}까지 반납`; } // Figma: 빌릴게 Item Grid (nodeId 1243:73343) 순서·물품명·수량을 그대로 옮긴 목데이터 — 실 API 연동 전까지 사용 export const BILILGE_ITEMS: BililgeItem[] = [ - { icon: curlingIron, id: "curling-iron", name: "고데기", quantity: 28 }, + { + icon: curlingIron, + id: "curling-iron", + name: "고데기", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 17), + }, { icon: laptopCharger, id: "laptop-charger", name: "노트북 충전기(C타입)", quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(1), + }, + { + icon: hairDryer, + id: "hair-dryer", + name: "드라이기", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 21), + }, + { + icon: mask, + id: "mask", + name: "마스크", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(3), + }, + { + icon: bandAid, + id: "band-aid", + name: "밴드", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(3), + }, + { + icon: powerBank, + id: "power-bank", + name: "보조배터리", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(1), }, - { icon: hairDryer, id: "hair-dryer", name: "드라이기", quantity: 28 }, - { icon: mask, id: "mask", name: "마스크", quantity: 28 }, - { icon: bandAid, id: "band-aid", name: "밴드", quantity: 28 }, - { icon: powerBank, id: "power-bank", name: "보조배터리", quantity: 28 }, { icon: sanitaryPad, id: "sanitary-pad-large", name: "생리대(대형)", quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 22), }, { icon: sanitaryPad, id: "sanitary-pad-small", name: "생리대(소형)", quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 22), + }, + { + icon: alcoholSwab, + id: "alcohol-swab", + name: "알콜스왑", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(2), + }, + { + icon: umbrella, + id: "umbrella", + name: "우산", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(2), + }, + { + icon: pill, + id: "stomach-medicine", + name: "위장약", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(1), + }, + { + icon: pill, + id: "easyen-6", + name: "이지엔6", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(1), + }, + { + icon: eyeDrops, + id: "eye-drops", + name: "인공눈물", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 19), + }, + { + icon: pill, + id: "cold-medicine", + name: "종합감기약", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(1), }, - { icon: alcoholSwab, id: "alcohol-swab", name: "알콜스왑", quantity: 28 }, - { icon: umbrella, id: "umbrella", name: "우산", quantity: 28 }, - { icon: pill, id: "stomach-medicine", name: "위장약", quantity: 28 }, - { icon: pill, id: "easyen-6", name: "이지엔6", quantity: 28 }, - { icon: eyeDrops, id: "eye-drops", name: "인공눈물", quantity: 28 }, - { icon: pill, id: "cold-medicine", name: "종합감기약", quantity: 28 }, { icon: usbCCharger, id: "usb-c-cable", name: "케이블(C to C)", quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 20), + }, + { + icon: pill, + id: "tylenol", + name: "타이레놀", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(2), }, - { icon: pill, id: "tylenol", name: "타이레놀", quantity: 28 }, { icon: painReliefPatch, id: "pain-relief-patch", name: "파스", quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(2), + }, + { + icon: ointment, + id: "ointment", + name: "후시딘", + quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(1), }, - { icon: ointment, id: "ointment", name: "후시딘", quantity: 28 }, { icon: eightPinCharger, id: "8pin-charger", name: "8핀 충전기", quantity: 28, + returnDeadlineLabel: mockReturnDeadlineLabel(0, 18), }, ]; From 92570e51ec026da931b64c2987711cb3ddf3b953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=84=9C=EC=A4=80?= <104981505+xeoxxn@users.noreply.github.com> Date: Tue, 29 Sep 2026 15:03:10 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=EB=B9=8C=EB=A6=B4=EA=B2=8C=20?= =?UTF-8?q?=EB=8C=80=EC=97=AC=ED=95=A0=20=EB=AC=BC=ED=92=88=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EB=B0=98=EB=82=A9=20=EA=B8=B0=ED=95=9C=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EA=B5=B5=EA=B8=B0=EB=A5=BC=20Figma=EC=97=90=20?= =?UTF-8?q?=EB=A7=9E=EA=B2=8C=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- .../bililge/components/BililgeItemCard.tsx | 15 +++++++++++++++ .../bililge/components/BililgeRentalSheet.tsx | 9 +++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/features/bililge/components/BililgeItemCard.tsx b/src/features/bililge/components/BililgeItemCard.tsx index f0a83a7..826b65d 100644 --- a/src/features/bililge/components/BililgeItemCard.tsx +++ b/src/features/bililge/components/BililgeItemCard.tsx @@ -8,6 +8,10 @@ interface BililgeItemCardProps { icon: string; itemName: string; subtitle: string; + // 대여 바텀시트의 "대여할 물품" 카드(nodeId 1422:57184)에서만 subtitle 뒤에 반납 기한이 + // 강조(SemiBold) 서체로 붙는다 — "수량 28 · "(Regular)에 이어지는 "9/29까지 반납" 부분. + // 다른 호출부(메인 목록·반납 목록)는 안 넘기면 기존처럼 subtitle 전체가 Regular로 나온다. + subtitleEmphasis?: string; trailingControl?: "button" | "stepper"; actionLabel?: string; onRentRequest?: () => void; @@ -29,6 +33,7 @@ function BililgeItemCard({ icon, itemName, subtitle, + subtitleEmphasis, trailingControl = "button", actionLabel = "대여 신청", onRentRequest, @@ -61,6 +66,16 @@ function BililgeItemCard({ weight="regular" > {subtitle} + {subtitleEmphasis && ( + + {subtitleEmphasis} + + )} diff --git a/src/features/bililge/components/BililgeRentalSheet.tsx b/src/features/bililge/components/BililgeRentalSheet.tsx index 93572a4..69887c9 100644 --- a/src/features/bililge/components/BililgeRentalSheet.tsx +++ b/src/features/bililge/components/BililgeRentalSheet.tsx @@ -98,11 +98,12 @@ function BililgeRentalSheet({ item, open, onClose }: BililgeRentalSheetProps) { setStepperValue((value) => Math.min(item.quantity, value + 1)) } // Figma: 대여할 물품 카드(nodeId 1422:57184, 3013:114608)에 "수량 28 · 오늘 - // 17시까지 반납" / "수량 28 · 9/29까지 반납"처럼 수량 뒤에 반납 기한이 붙는다 — - // 기한 라벨(returnDeadlineLabel)은 서버가 오늘/내일/날짜를 미리 판단해 내려주는 - // 완성된 문자열이라 여기서는 이어붙이기만 한다. + // 17시까지 반납" / "수량 28 · 9/29까지 반납"처럼 수량 뒤에 반납 기한이 강조 + // 서체(SemiBold)로 붙는다 — 기한 라벨(returnDeadlineLabel)은 서버가 오늘/내일/ + // 날짜를 미리 판단해 내려주는 완성된 문자열이라 여기서는 이어붙이기만 한다. stepperValue={stepperValue} - subtitle={`수량 ${item.quantity} · ${item.returnDeadlineLabel}`} + subtitle={`수량 ${item.quantity} · `} + subtitleEmphasis={item.returnDeadlineLabel} trailingControl="stepper" /> From 186e7413d0320bf9d92606aff998754552f8382d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=84=9C=EC=A4=80?= <104981505+xeoxxn@users.noreply.github.com> Date: Tue, 29 Sep 2026 15:03:17 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=EB=B9=8C=EB=A6=B4=EA=B2=8C=20?= =?UTF-8?q?=EB=B0=98=EB=82=A9=20=EA=B8=B0=ED=95=9C=20=EB=AA=A9=EC=97=85?= =?UTF-8?q?=EC=9D=98=20=EC=98=A4=EB=8A=98=20=EB=A7=88=EA=B0=90=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=81=EC=9D=84=2017=EC=8B=9C=EB=A1=9C=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- .../bililge/constants/bililgeItems.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/features/bililge/constants/bililgeItems.ts b/src/features/bililge/constants/bililgeItems.ts index f188bda..0dfb5cf 100644 --- a/src/features/bililge/constants/bililgeItems.ts +++ b/src/features/bililge/constants/bililgeItems.ts @@ -32,9 +32,10 @@ export interface BililgeItem { // 목데이터는 실 서버가 없어 위 필드를 흉내내는 값이다 — 실행 시점 기준으로 오늘/내일/그 이후 // 라벨을 미리 계산해두되, 컴포넌트 쪽에는 이 계산 로직 자체를 노출하지 않는다(export하지 않음). // 실 API가 붙으면 이 함수와 호출부는 통째로 지우고 응답 필드를 그대로 쓰면 된다. -function mockReturnDeadlineLabel(daysFromNow: number, hour = 17): string { +// 오늘 마감은 시각이 물품마다 다른 게 아니라 "17시"로 고정된 정책값이라 파라미터로 받지 않는다. +function mockReturnDeadlineLabel(daysFromNow: number): string { if (daysFromNow <= 0) { - return `오늘 ${hour}시까지 반납`; + return "오늘 17시까지 반납"; } if (daysFromNow === 1) { return "내일까지 반납"; @@ -51,7 +52,7 @@ export const BILILGE_ITEMS: BililgeItem[] = [ id: "curling-iron", name: "고데기", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 17), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, { icon: laptopCharger, @@ -65,7 +66,7 @@ export const BILILGE_ITEMS: BililgeItem[] = [ id: "hair-dryer", name: "드라이기", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 21), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, { icon: mask, @@ -93,14 +94,14 @@ export const BILILGE_ITEMS: BililgeItem[] = [ id: "sanitary-pad-large", name: "생리대(대형)", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 22), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, { icon: sanitaryPad, id: "sanitary-pad-small", name: "생리대(소형)", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 22), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, { icon: alcoholSwab, @@ -135,7 +136,7 @@ export const BILILGE_ITEMS: BililgeItem[] = [ id: "eye-drops", name: "인공눈물", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 19), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, { icon: pill, @@ -149,7 +150,7 @@ export const BILILGE_ITEMS: BililgeItem[] = [ id: "usb-c-cable", name: "케이블(C to C)", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 20), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, { icon: pill, @@ -177,6 +178,6 @@ export const BILILGE_ITEMS: BililgeItem[] = [ id: "8pin-charger", name: "8핀 충전기", quantity: 28, - returnDeadlineLabel: mockReturnDeadlineLabel(0, 18), + returnDeadlineLabel: mockReturnDeadlineLabel(0), }, ];