260202_01_ENH: route 구조 초창기 기획으로 다시 변경 및 Category 별 하위 페이지에 샘플 데이터 모두 적용

This commit is contained in:
2026-02-02 11:32:50 +09:00
parent 4b40c43962
commit 6f8e09bcf3
60 changed files with 1750 additions and 464 deletions

View File

@@ -8,18 +8,14 @@ import {
} from "@/components/lge-dashboard";
import {apiTrendBuy} from "@/config/sample.data";
import {useLayoutFilter} from "@/components/layout/LayoutFilterContext";
import {formatRowLabel} from "@/lib/lg-dashboard";
const PurchasePage = () => {
const { totalValue } = useLayoutFilter();
console.log(totalValue);
const displayRowLabel = (i:number, rowLabel: string) => {
if (rowLabel === "gap") return "전년 대비 GAP(%)";
return rowLabel;
};
const { isTotal, filterValue } = useLayoutFilter();
console.log(filterValue);
const purchaseTableRows: TopChartTableRow[] = apiTrendBuy.map((row, i) => ({
label: displayRowLabel(i, row.rowLabel),
label: formatRowLabel(row.rowLabel),
values: PRODUCT_KEYS.map((k) => (row as any)[k] ?? null),
}));