Fix transaction delete type mismatch

The TransactionsContent component's onTransactionDelete prop was expecting a function that returns a boolean or a Promise<boolean>, but was receiving a function that returns void. This commit updates the type definition to match the expected return type.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-18 05:09:44 +00:00
parent ceb6dd4bcb
commit 0ed4073bfd
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ interface TransactionsContentProps {
searchQuery: string;
selectedMonth: string;
setSearchQuery: (query: string) => void;
onTransactionDelete: (id: string) => void;
onTransactionDelete: (id: string) => Promise<boolean> | boolean;
isDisabled: boolean;
}

View File

@@ -35,7 +35,7 @@ const Transactions = () => {
}, [budgetData, isLoading]);
// 트랜잭션 삭제 핸들러 - 간소화 및 안정성 개선
const handleTransactionDelete = async (id: string) => {
const handleTransactionDelete = async (id: string): Promise<boolean> => {
// 이미 처리 중인 경우 작업 무시
if (isProcessing || deletingId === id) {
console.log('이미 삭제 작업이 진행 중입니다:', deletingId);