Fix budget update issue
Addresses an issue where budget updates were not being applied correctly.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user