From 479cb862b160048a9ae41dd327fd239d9317e2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AF=BC=ED=97=8C?= Date: Tue, 14 Jul 2026 10:57:07 +0900 Subject: [PATCH] =?UTF-8?q?feat(lps-admin):=20=EC=83=81=ED=92=88=C2=B7?= =?UTF-8?q?=EA=B0=80=EA=B2=A9=20=E2=80=94=20'=EB=AA=B0=EB=B3=84=20?= =?UTF-8?q?=EC=B5=9C=EC=A0=80=EA=B0=80'+'=EA=B2=80=EC=A6=9D=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC'=20=EB=A5=BC=20=EB=AA=B0=EB=B3=84=20=EA=B0=80?= =?UTF-8?q?=EA=B2=A9=20=EB=B9=84=EA=B5=90=EB=A1=9C=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 두 카드가 사실 같은 데이터(by_mall)를 다르게 그린 것이라 하나로 합침. 상위 N개(3/5/10/전체 선택)를 순위·쇼핑몰·상품명·가격·최저가 대비 델타· 링크 한 줄로 보여주고 가격 비교 막대를 얹어 한눈에 비교 가능. - MallEntry 타입 필드명 버그 수정(mall/url → mall_name/detail_url/name) — 기존 몰별 최저가 차트에 몰 이름이 안 보이던 원인. 이제 표시됨. - 상위 N 은 프리셋 칩(by_mall 이 몰별 dedup 소집합이라 자유입력보다 적합). - '검색어'는 항목별로 없어 각 몰의 상품명(title)으로 대체 — 같은 상품 검증 역할. - 모바일 가로 스크롤 해소: 상단 네비 overflow-x-auto 가 페이지를 늘리던 것(루트 w-full 누락)과 master-detail 그리드 자식 min-w-0 누락 동반 수정. - 실기동 검증: G마켓 56,880/플랜88 59,900 렌더·칩 토글·데스크톱/모바일 hscroll 0·콘솔 에러 0. Co-Authored-By: Claude Fable 5 --- lps-admin/src/api/types.ts | 6 +- lps-admin/src/components/Layout.tsx | 4 +- lps-admin/src/pages/Products.tsx | 145 ++++++++++++++++++---------- 3 files changed, 98 insertions(+), 57 deletions(-) diff --git a/lps-admin/src/api/types.ts b/lps-admin/src/api/types.ts index dc04af5..df55156 100644 --- a/lps-admin/src/api/types.ts +++ b/lps-admin/src/api/types.ts @@ -81,13 +81,15 @@ export interface ProductListRes { items: ProductItem[]; } +/** 몰별 최저가 스냅샷 원소(price_history.by_mall) — summarize_by_mall 출력과 정합. */ export interface MallEntry { - mall?: string; source?: string; + mall_name?: string; price?: number; shipping_fee?: number | null; shipping_type?: string | null; - url?: string; + name?: string; + detail_url?: string; } export interface PricePoint { diff --git a/lps-admin/src/components/Layout.tsx b/lps-admin/src/components/Layout.tsx index ae335ee..97cf906 100644 --- a/lps-admin/src/components/Layout.tsx +++ b/lps-admin/src/components/Layout.tsx @@ -18,9 +18,9 @@ export default function Layout() { const health = useQuery({ queryKey: ["healthz"], queryFn: healthz, refetchInterval: 10_000 }); const up = health.data === true; return ( -
+
{/* 모바일( +