From 0fe4825741fc4704c0af680705a15e88c16a4c57 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:56:29 +0000 Subject: [PATCH] Visual edit in Lovable Edited UI in Lovable --- src/components/RecentTransactionsSection.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/RecentTransactionsSection.tsx b/src/components/RecentTransactionsSection.tsx index d54f99f..716db8f 100644 --- a/src/components/RecentTransactionsSection.tsx +++ b/src/components/RecentTransactionsSection.tsx @@ -6,12 +6,10 @@ import { useBudget } from '@/contexts/BudgetContext'; import { Link } from 'react-router-dom'; import { categoryIcons } from '@/constants/categoryIcons'; import TransactionIcon from './transaction/TransactionIcon'; - interface RecentTransactionsSectionProps { transactions: Transaction[]; onUpdateTransaction?: (transaction: Transaction) => void; } - const RecentTransactionsSection: React.FC = ({ transactions, onUpdateTransaction @@ -22,12 +20,10 @@ const RecentTransactionsSection: React.FC = ({ updateTransaction, deleteTransaction } = useBudget(); - const handleTransactionClick = (transaction: Transaction) => { setSelectedTransaction(transaction); setIsDialogOpen(true); }; - const handleUpdateTransaction = (updatedTransaction: Transaction) => { if (onUpdateTransaction) { onUpdateTransaction(updatedTransaction); @@ -35,16 +31,13 @@ const RecentTransactionsSection: React.FC = ({ // 직접 컨텍스트를 통해 업데이트 updateTransaction(updatedTransaction); }; - const handleDeleteTransaction = (id: string) => { // 직접 컨텍스트를 통해 삭제 deleteTransaction(id); }; - const formatCurrency = (amount: number) => { return amount.toLocaleString('ko-KR') + '원'; }; - return

최근 지출

@@ -53,7 +46,7 @@ const RecentTransactionsSection: React.FC = ({
- {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 px-4 cursor-pointer hover:bg-gray-50"> + {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 cursor-pointer hover:bg-gray-50 px-[5px]">
@@ -73,5 +66,4 @@ const RecentTransactionsSection: React.FC = ({ {selectedTransaction && }
; }; - -export default RecentTransactionsSection; +export default RecentTransactionsSection; \ No newline at end of file