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

@@ -10,20 +10,16 @@ import {
apiOwnShareOfTotalPenetration,
apiTrendCategories
} from "@/config/sample.data";
import LifeStageDiv from "@/components/lge-dashboard/sub-page/LifeStageDiv";
import LifeStageDiv from "@/components/lge-dashboard/combo/LifeStageDiv";
import {useLayoutFilter} from "@/components/layout/LayoutFilterContext";
import {formatRowLabel} from "@/lib/lg-dashboard";
const LGPenetrationPage = () => {
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 productTableRows: TopChartTableRow[] = apiOwnShareOfTotalPenetration.map((row, i) => ({
label: displayRowLabel(i, row.rowLabel),
label: formatRowLabel(row.rowLabel),
values: PRODUCT_KEYS.map((k) => (row as any)[k] ?? null),
}));