From 1393acc4b6675fd5eac65c6f1a9e399edfb2d44f Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Mon, 3 Nov 2025 18:46:35 +0900
Subject: (김준회) SWP: 커버페이지 생성 API 오류 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/swp/table/swp-table.tsx | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

(limited to 'lib/swp/table/swp-table.tsx')

diff --git a/lib/swp/table/swp-table.tsx b/lib/swp/table/swp-table.tsx
index 4d824f77..21a1c775 100644
--- a/lib/swp/table/swp-table.tsx
+++ b/lib/swp/table/swp-table.tsx
@@ -1,6 +1,6 @@
 "use client";
 
-import React, { useState, useEffect } from "react";
+import React, { useState } from "react";
 import {
   useReactTable,
   getCoreRowModel,
@@ -17,15 +17,12 @@ import {
 import { swpDocumentColumns } from "./swp-table-columns";
 import { SwpDocumentDetailDialog } from "./swp-document-detail-dialog";
 import type { DocumentListItem } from "@/lib/swp/document-service";
-import { toast } from "sonner";
-import { quickDownload } from "@/lib/file-download";
 
 interface SwpTableProps {
   documents: DocumentListItem[];
   projNo: string;
   vendorCode: string;
   userId: string;
-  onCoverDownload?: (document: DocumentListItem) => void;
 }
 
 export function SwpTable({
@@ -33,7 +30,6 @@ export function SwpTable({
   projNo,
   vendorCode,
   userId,
-  onCoverDownload,
 }: SwpTableProps) {
   const [dialogOpen, setDialogOpen] = useState(false);
   const [selectedDocument, setSelectedDocument] = useState<DocumentListItem | null>(null);
@@ -50,22 +46,6 @@ export function SwpTable({
     setDialogOpen(true);
   };
 
-  // 커버페이지 다운로드 이벤트 리스너
-  useEffect(() => {
-    const handleCoverDownload = (event: CustomEvent) => {
-      const { document } = event.detail;
-      if (onCoverDownload) {
-        onCoverDownload(document);
-      }
-    };
-
-    window.addEventListener('coverDownload', handleCoverDownload as EventListener);
-
-    return () => {
-      window.removeEventListener('coverDownload', handleCoverDownload as EventListener);
-    };
-  }, [onCoverDownload]);
-
   return (
     <div className="space-y-4">
       {/* 테이블 */}
-- 
cgit v1.2.3

