260205_02_CLN: 안쓰는 import 정리
This commit is contained in:
@@ -31,7 +31,7 @@ import {norm} from "@/lib/utils";
|
||||
import {LifeStageGroup, LifeStageRow} from "@/types/lg";
|
||||
|
||||
const LGPenetrationPage = () => {
|
||||
const { isTotal, filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
const { filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
console.log(filterValue);
|
||||
|
||||
const productTableRows = useMemo<TopChartTableRow[]>(() => {
|
||||
@@ -102,7 +102,7 @@ const LGPenetrationPage = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
registerExcelExporter(async (payload) => {
|
||||
registerExcelExporter(async () => {
|
||||
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
|
||||
const lifeStageHeader = buildHeader_LifeStageColumns(LIFE_STAGE_COLUMNS);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { formatRowLabel } from "@/lib/lg-dashboard";
|
||||
import {buildHeader_ProductKeyMap, exportDashboardExcel} from "@/lib/lg-export-excel";
|
||||
|
||||
const LGPurchasePage = () => {
|
||||
const { isTotal, filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
const { filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
console.log(filterValue);
|
||||
|
||||
const purchaseTableRows = useMemo<TopChartTableRow[]>(() => {
|
||||
@@ -64,7 +64,7 @@ const LGPurchasePage = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
registerExcelExporter(async (payload) => {
|
||||
registerExcelExporter(async () => {
|
||||
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
|
||||
|
||||
await exportDashboardExcel({
|
||||
|
||||
@@ -25,7 +25,7 @@ import { formatRowLabel } from "@/lib/lg-dashboard";
|
||||
import {buildHeader_ProductKeyMap, exportDashboardExcel} from "@/lib/lg-export-excel";
|
||||
|
||||
const PenetrationPage = () => {
|
||||
const { isTotal, filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
const { filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
console.log(filterValue);
|
||||
|
||||
const [isBrandShare, setIsBrandShare] = useState(false);
|
||||
@@ -73,7 +73,7 @@ const PenetrationPage = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
registerExcelExporter(async (payload) => {
|
||||
registerExcelExporter(async () => {
|
||||
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
|
||||
|
||||
await exportDashboardExcel({
|
||||
|
||||
@@ -15,7 +15,7 @@ import { formatRowLabel } from "@/lib/lg-dashboard";
|
||||
import {buildHeader_ProductKeyMap, exportDashboardExcel} from "@/lib/lg-export-excel";
|
||||
|
||||
const PurchasePage = () => {
|
||||
const { isTotal, filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
const { filterValue, registerExcelExporter } = useLayoutFilter();
|
||||
console.log(filterValue);
|
||||
|
||||
const purchaseTableRows = useMemo<TopChartTableRow[]>(() => {
|
||||
@@ -38,7 +38,7 @@ const PurchasePage = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
registerExcelExporter(async (payload) => {
|
||||
registerExcelExporter(async () => {
|
||||
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
|
||||
|
||||
await exportDashboardExcel({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import {ReactNode, useEffect, useMemo, useRef, useState} from "react";
|
||||
import {ReactNode, useEffect, useRef, useState} from "react";
|
||||
import {usePathname, useRouter} from "next/navigation";
|
||||
import {cn} from "@/lib/utils";
|
||||
import {SelectedMap} from "@/types/common";
|
||||
@@ -12,10 +12,9 @@ import SubMenu from "./SubMenu";
|
||||
import TotalFilter from "./TotalFilter";
|
||||
import CategoryFilter, {CategoryFilterValue} from "./CategoryFilter";
|
||||
import ExcelDownloadButton from "./ExcelDownloadButton";
|
||||
import {ExcelExportContext, LayoutFilterProvider} from "./LayoutFilterContext";
|
||||
import {LayoutFilterProvider} from "./LayoutFilterContext";
|
||||
import {PRODUCTS_FILTER_ITEM} from "@/const/lgConst";
|
||||
import {ProductsFilterItem} from "@/types/lg";
|
||||
import {useLoading} from "@/hooks/useLoading";
|
||||
import {ArrowUp} from "lucide-react";
|
||||
|
||||
type MainLayoutProps = {
|
||||
@@ -48,7 +47,6 @@ export const buildDefaultCategoryValue = (categoryFilterItems: ProductsFilterIte
|
||||
const MainLayout = ({ children }: MainLayoutProps) => {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const { withLoadingAsync } = useLoading();
|
||||
|
||||
const scrollRef = useRef<HTMLDivElement | null>(null);
|
||||
const [showScrollTop, setShowScrollTop] = useState(false);
|
||||
|
||||
@@ -758,7 +758,7 @@ export async function exportDashboardExcel<T extends Record<string, any>>(opts:
|
||||
});
|
||||
} else {
|
||||
// 기본: 첫 컬럼 넓게, 나머지 적당히
|
||||
header.leafKeys.forEach((k, idx) => {
|
||||
header.leafKeys.forEach((_k, idx) => {
|
||||
ws.getColumn(idx + 1).width = idx === 0 ? 22 : 14;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user