Fix data initialization issues

Addresses problems with budget display and data reset:
- Ensures budget data is correctly displayed after initialization.
- Fixes issue where daily and weekly budget data were missing.
- Corrects data reset to properly clear transaction data.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 07:58:53 +00:00
parent 55c2ece3ce
commit d4afc2eedb
5 changed files with 37 additions and 10 deletions

View File

@@ -33,8 +33,8 @@ const BudgetTabContent: React.FC<BudgetTabContentProps> = ({
const actualPercentage = targetAmount > 0 ? Math.round(spentAmount / targetAmount * 100) : 0;
const percentage = actualPercentage;
// 예산이 설정되었는지 여부 확인 (0이면 미설정으로 간주)
const isBudgetSet = targetAmount > 0;
// 예산이 설정되었는지 여부 확인 (정확히 0이면 미설정으로 간주)
const isBudgetSet = targetAmount !== 0;
// 예산 초과 여부 계산
const isOverBudget = spentAmount > targetAmount && targetAmount > 0;