Fix budget update issue

Addresses an issue where budget updates were not being applied correctly.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 11:20:58 +00:00
parent b81187a4d8
commit 0702145431
4 changed files with 11 additions and 7 deletions

View File

@@ -110,12 +110,13 @@ export const useBudgetTabContent = ({
// 총액이 0이 아닐 때만 저장 처리
if (totalBudget > 0) {
// 명시적으로 월간 예산으로 설정 - 'monthly' 타입으로 전달
// 명시적으로 월간 예산으로 설정 - 항상 월간 예산만 저장
onSaveBudget(totalBudget, updatedCategoryBudgets);
setShowBudgetInput(false);
// 이벤트 발생 추가 (데이터 저장 후 즉시 UI 업데이트를 위해)
setTimeout(() => {
console.log('예산 데이터 저장 후 이벤트 발생');
window.dispatchEvent(new Event('budgetDataUpdated'));
}, 200);
} else {