From ffacf689f92a4fd42a3811297ff80696fb0d1403 Mon Sep 17 00:00:00 2001 From: changwng Date: Thu, 10 Jul 2025 15:10:41 +0900 Subject: [PATCH] =?UTF-8?q?[groups]=20tableData=20build=EC=8B=9C=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=EB=A1=9C=20=EB=8B=A4=EC=8B=9C=20=EC=98=AC?= =?UTF-8?q?=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/groups/model/groups-table-columns.tsx | 8 ++++++++ apps/cs/src/types/tanstack-table.d.ts | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 apps/cs/src/types/tanstack-table.d.ts diff --git a/apps/cs/src/pages/groups/model/groups-table-columns.tsx b/apps/cs/src/pages/groups/model/groups-table-columns.tsx index 0f417a304..0cb6a1f84 100644 --- a/apps/cs/src/pages/groups/model/groups-table-columns.tsx +++ b/apps/cs/src/pages/groups/model/groups-table-columns.tsx @@ -4,6 +4,14 @@ import { type GroupListResponseDto } from "@/entities/group"; import { MenuAuthorityDialog } from "../ui/menu-authority-dialog"; import { GroupsDialog } from "../ui/groups-dialog"; + +declare module "@tanstack/react-table" { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + interface TableMeta { + onDelete: (groupId: string) => void; + } +} + export const columns: ColumnDef[] = [ { accessorKey: "groupId", diff --git a/apps/cs/src/types/tanstack-table.d.ts b/apps/cs/src/types/tanstack-table.d.ts deleted file mode 100644 index 9cd9838a2..000000000 --- a/apps/cs/src/types/tanstack-table.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import '@tanstack/react-table'; - -// 오류가 표시되는 이유는 TypeScript가 meta 객체 안에 onDelete라는 속성이 존재한다는 것을 모르기 때문입니다 -declare module '@tanstack/react-table' { - // TData는 테이블의 row 데이터 타입을 의미합니다. - // interface TableMeta에 우리 프로젝트에서 사용할 커스텀 속성의 타입을 정의합니다. - interface TableMeta { - // handleDelete 함수가 string 타입의 인자를 받으므로, 타입을 명시해줍니다. - onDelete: (groupId: string) => void; - } -} \ No newline at end of file