From 0ed4073bfd7deb183efc5f6c9b65deabd4954029 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 05:09:44 +0000 Subject: [PATCH] Fix transaction delete type mismatch The TransactionsContent component's onTransactionDelete prop was expecting a function that returns a boolean or a Promise, but was receiving a function that returns void. This commit updates the type definition to match the expected return type. --- src/components/transactions/TransactionsContent.tsx | 2 +- src/pages/Transactions.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/transactions/TransactionsContent.tsx b/src/components/transactions/TransactionsContent.tsx index d362d0b..27aef88 100644 --- a/src/components/transactions/TransactionsContent.tsx +++ b/src/components/transactions/TransactionsContent.tsx @@ -13,7 +13,7 @@ interface TransactionsContentProps { searchQuery: string; selectedMonth: string; setSearchQuery: (query: string) => void; - onTransactionDelete: (id: string) => void; + onTransactionDelete: (id: string) => Promise | boolean; isDisabled: boolean; } diff --git a/src/pages/Transactions.tsx b/src/pages/Transactions.tsx index ca4a6bd..9f9f4a3 100644 --- a/src/pages/Transactions.tsx +++ b/src/pages/Transactions.tsx @@ -35,7 +35,7 @@ const Transactions = () => { }, [budgetData, isLoading]); // 트랜잭션 삭제 핸들러 - 간소화 및 안정성 개선 - const handleTransactionDelete = async (id: string) => { + const handleTransactionDelete = async (id: string): Promise => { // 이미 처리 중인 경우 작업 무시 if (isProcessing || deletingId === id) { console.log('이미 삭제 작업이 진행 중입니다:', deletingId);