Fix: Resolve issue with transaction display

Addresses a bug where transactions were not displayed on the transaction history page and expense amounts were showing as zero.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-17 23:32:02 +00:00
parent a9974f9877
commit 042965461e
6 changed files with 181 additions and 72 deletions

View File

@@ -24,6 +24,11 @@ const TransactionsHeader: React.FC<TransactionsHeaderProps> = ({
totalExpenses,
isDisabled
}) => {
console.log('TransactionsHeader 렌더링:', { selectedMonth, totalExpenses });
// 예산 정보가 없는 경우 기본값 사용
const targetAmount = budgetData?.monthly?.targetAmount || 0;
return (
<header className="py-8">
<h1 className="text-2xl font-bold neuro-text mb-5"> </h1>
@@ -70,7 +75,7 @@ const TransactionsHeader: React.FC<TransactionsHeaderProps> = ({
<div className="neuro-card">
<p className="text-sm text-gray-500 mb-1"> </p>
<p className="text-lg font-bold text-neuro-income">
{formatCurrency(budgetData?.monthly?.targetAmount || 0)}
{formatCurrency(targetAmount)}
</p>
</div>
<div className="neuro-card">