260202_01_ENH: route 구조 초창기 기획으로 다시 변경 및 Category 별 하위 페이지에 샘플 데이터 모두 적용
This commit is contained in:
@@ -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),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user