Address unresolved issues
This commit addresses previously reported issues that remain unresolved. Further investigation is required.
This commit is contained in:
@@ -29,7 +29,7 @@ const BudgetTabContent: React.FC<BudgetTabContentProps> = ({
|
||||
const spentAmount = data.spentAmount;
|
||||
const targetAmount = data.targetAmount;
|
||||
|
||||
// 예산 설정 여부 확인 (더 엄격하게 체크)
|
||||
// 예산 설정 여부 확인 (수정: 0보다 큰지만 확인)
|
||||
const isBudgetSet = targetAmount > 0;
|
||||
|
||||
// 디버깅을 위한 로그 추가
|
||||
@@ -87,6 +87,11 @@ const BudgetTabContent: React.FC<BudgetTabContentProps> = ({
|
||||
if (totalBudget > 0) {
|
||||
onSaveBudget(totalBudget, updatedCategoryBudgets);
|
||||
setShowBudgetInput(false);
|
||||
|
||||
// 이벤트 발생 추가 (데이터 저장 후 즉시 UI 업데이트를 위해)
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(new Event('budgetDataUpdated'));
|
||||
}, 200);
|
||||
} else {
|
||||
alert('예산을 입력해주세요.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user