Fix budget calculation issue

The budget was being tripled on the expense and analytics pages. This commit fixes the calculation logic to ensure the budget is displayed correctly.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-18 02:02:27 +00:00
parent 5bf8ff6e3f
commit 00727c8ab6
3 changed files with 12 additions and 11 deletions

View File

@@ -25,9 +25,11 @@ export const useTransactionsLoader = (
const localTransactions = loadTransactionsFromStorage();
setTransactions(localTransactions);
// 예산 가져오기
// 예산 가져오기 (월간 예산만 설정)
const budgetAmount = loadBudgetFromStorage();
setTotalBudget(budgetAmount);
console.log('로드된 예산 금액:', budgetAmount);
} catch (err) {
console.error('트랜잭션 로드 중 오류:', err);
setError('데이터를 불러오는 중 문제가 발생했습니다.');