Remove daily and weekly tabs

Removed the daily and weekly budget tabs from the budget progress card, leaving only the monthly tab.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 12:06:32 +00:00
parent 0bc53208b5
commit 8cda329feb
6 changed files with 57 additions and 187 deletions

View File

@@ -12,7 +12,7 @@ export const useBudgetState = () => {
console.log('초기 예산 데이터 로드:', initialBudgetData);
const [budgetData, setBudgetData] = useState<BudgetData>(initialBudgetData);
const [selectedTab, setSelectedTab] = useState<BudgetPeriod>("daily"); // 초기값은 daily
const [selectedTab, setSelectedTab] = useState<BudgetPeriod>("monthly"); // 초기값은 monthly로 변경
const [isInitialized, setIsInitialized] = useState(false);
const [lastUpdateTime, setLastUpdateTime] = useState(0);

View File

@@ -17,20 +17,9 @@ export const useExtendedBudgetUpdate = (
) => {
console.log('확장 예산 업데이트 시작:', type, amount, newCategoryBudgets);
// 항상 입력값을 월간 기준으로 변환하여 예산 업데이트
let monthlyAmount = amount;
if (type === 'weekly') {
// 주간 예산을 월간으로 변환 (4.345주/월)
monthlyAmount = Math.round(amount * 4.345);
} else if (type === 'daily') {
// 일일 예산을 월간으로 변환 (30일/월)
monthlyAmount = Math.round(amount * 30);
}
// 월간 기준으로 예산 업데이트
console.log(`예산 업데이트: 원래 타입=${type}, 금액=${amount}, 변환된 월간 금액=${monthlyAmount}`);
handleBudgetUpdate('monthly', monthlyAmount);
// 타입에 상관없이 항상 월간으로 처리
console.log(`예산 업데이트: 입력 금액=${amount}, 항상 월간으로 설정`);
handleBudgetUpdate('monthly', amount);
// 카테고리 예산 업데이트 (제공된 경우)
if (newCategoryBudgets) {