Fix: Resolve duplicate function definition

The `deleteTransactionFromSupabase` function was defined in both `deleteTransactionStorage.ts` and `supabaseUtils.ts`. This commit removes the duplicate definition from `deleteTransactionStorage.ts` to resolve the error.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-18 04:07:57 +00:00
parent 1dcd63cb12
commit a0074c2d1d

View File

@@ -2,7 +2,7 @@
import { MutableRefObject } from 'react'; import { MutableRefObject } from 'react';
import { Transaction } from '@/components/TransactionCard'; import { Transaction } from '@/components/TransactionCard';
import { saveTransactionsToStorage } from '../../storageUtils'; import { saveTransactionsToStorage } from '../../storageUtils';
import { deleteTransactionFromSupabase as deleteFromSupabase } from '../../supabaseUtils'; import { deleteTransactionFromSupabase } from '../../supabaseUtils';
import { toast } from '@/hooks/useToast.wrapper'; import { toast } from '@/hooks/useToast.wrapper';
import { normalizeDate } from '@/utils/sync/transaction/dateUtils'; import { normalizeDate } from '@/utils/sync/transaction/dateUtils';
@@ -33,7 +33,7 @@ export const handleDeleteStorage = (
setTimeout(() => { setTimeout(() => {
try { try {
// 동기화 작업 실행 // 동기화 작업 실행
deleteFromSupabase(user, id) deleteTransactionFromSupabase(user, id)
.catch(error => { .catch(error => {
console.error('Supabase 삭제 오류:', error); console.error('Supabase 삭제 오류:', error);
}) })
@@ -105,4 +105,4 @@ export const handleDeleteStorage = (
} }
}; };
// 내부 함수 선언 제거 (supabaseUtils.ts에서 가져오기 때문에 중복 선언할 필요 없음) // 중복 정의된 함수 제거 - 이미 import로 가져오고 있으므로 여기서 중복 선언할 필요습니다.