Refactor project for improvements

This commit refactors the project to improve overall code quality, performance, and maintainability. Specific changes may include code cleanup, optimization, and architectural enhancements.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-18 07:45:06 +00:00
parent 854d27574f
commit 8e609519ac
4 changed files with 109 additions and 104 deletions

View File

@@ -13,12 +13,14 @@ const TransactionDateGroup: React.FC<TransactionDateGroupProps> = ({
transactions,
onTransactionDelete
}) => {
// onTransactionDelete 함수를 래핑하여 Promise<boolean>을 반환하도록 보장
// 안정적인 삭제 핸들러
const handleDelete = async (id: string): Promise<boolean> => {
try {
return await onTransactionDelete(id);
// 적절한 타입 변환 처리
const result = await Promise.resolve(onTransactionDelete(id));
return !!result;
} catch (error) {
console.error('트랜잭션 삭제 처리 중 오류:', error);
console.error('삭제 처리 중 오류:', error);
return false;
}
};