260202_01_ENH: route 구조 초창기 기획으로 다시 변경 및 Category 별 하위 페이지에 샘플 데이터 모두 적용
This commit is contained in:
@@ -11,18 +11,14 @@ import {
|
||||
} from "@/components/lge-dashboard";
|
||||
import { apiOwnShareOfTotalPurchase, apiTrendBuy} from "@/config/sample.data";
|
||||
import {useLayoutFilter} from "@/components/layout/LayoutFilterContext";
|
||||
import {formatRowLabel} from "@/lib/lg-dashboard";
|
||||
|
||||
const LGPurchasePage = () => {
|
||||
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[] = apiOwnShareOfTotalPurchase.map((row, i) => ({
|
||||
label: displayRowLabel(i, row.rowLabel),
|
||||
label: formatRowLabel(row.rowLabel),
|
||||
values: PRODUCT_KEYS.map((k) => (row as any)[k] ?? null),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user