From 8d92c88ab341156d82156bae49c62a8101280e75 Mon Sep 17 00:00:00 2001
From: 0-Zz-ang <s1998319@gmail.com>
Date: Tue, 29 Jul 2025 09:08:52 +0900
Subject: (박서영) 설계 Document Numbering Rule 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/docu-list-rule/code-groups/table/code-groups-table.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'lib/docu-list-rule/code-groups/table/code-groups-table.tsx')

diff --git a/lib/docu-list-rule/code-groups/table/code-groups-table.tsx b/lib/docu-list-rule/code-groups/table/code-groups-table.tsx
index 6d8bb907..c10d3445 100644
--- a/lib/docu-list-rule/code-groups/table/code-groups-table.tsx
+++ b/lib/docu-list-rule/code-groups/table/code-groups-table.tsx
@@ -1,5 +1,6 @@
 "use client";
 import * as React from "react";
+import { useRouter } from "next/navigation";
 import { useDataTable } from "@/hooks/use-data-table";
 import { DataTable } from "@/components/data-table/data-table";
 import { DataTableAdvancedToolbar } from "@/components/data-table/data-table-advanced-toolbar";
@@ -8,7 +9,6 @@ import type {
   DataTableFilterField,
   DataTableRowAction,
 } from "@/types/table"
-import { getCodeGroups } from "../service";
 import { getColumns } from "./code-groups-table-columns";
 import { DeleteCodeGroupsDialog } from "./delete-code-groups-dialog";
 import { CodeGroupsEditSheet } from "./code-groups-edit-sheet";
@@ -20,14 +20,15 @@ interface CodeGroupsTableProps {
 }
 
 export function CodeGroupsTable({ promises }: CodeGroupsTableProps) {
+  const router = useRouter();
   const [rowAction, setRowAction] = React.useState<DataTableRowAction<typeof codeGroups.$inferSelect> | null>(null);
 
   const [{ data, pageCount }] = promises ? React.use(promises) : [{ data: [], pageCount: 0 }];
 
   const refreshData = React.useCallback(async () => {
-    // 페이지 새로고침으로 처리
-    window.location.reload();
-  }, []);
+    // 전체 페이지 새로고침 대신 router.refresh() 사용 (성능 개선)
+    router.refresh();
+  }, [router]);
 
   // 컬럼 설정 - 외부 파일에서 가져옴
   const columns = React.useMemo(
-- 
cgit v1.2.3

