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

@@ -11,21 +11,17 @@ import {useLayoutFilter} from "@/components/layout/LayoutFilterContext";
import {apiBrandByYearCategories, apiTrendCategories} from "@/config/sample.data";
import {Button} from "@/components/ui/button";
import {BRAND_LIST, PRODUCT_KEYS, PRODUCTS, YEARS, AXIS_HIDE_STYLE, GRID_X_NOT_PADDING} from "@/const/lgConst";
import {formatRowLabel} from "@/lib/lg-dashboard";
const PenetrationPage = () => {
const { totalValue, registerExcelExporter } = useLayoutFilter();
console.log(totalValue);
const { isTotal, filterValue, registerExcelExporter } = useLayoutFilter();
console.log(filterValue);
const [isBrandShare, setIsBrandShare] = useState<boolean>(false);
const displayRowLabel = (i:number, rowLabel: string) => {
if (rowLabel === "gap") return "전년 대비 GAP(%)";
return rowLabel;
};
const productTableRows: TopChartTableRow[] = apiTrendCategories.map((row, i) => ({
label: displayRowLabel(i, row.rowLabel),
label: formatRowLabel(row.rowLabel),
values: PRODUCT_KEYS.map((k) => (row as any)[k] ?? null),
}));