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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user