diff --git a/src/components/BudgetProgressCard.tsx b/src/components/BudgetProgressCard.tsx index 5a73826..c6745c1 100644 --- a/src/components/BudgetProgressCard.tsx +++ b/src/components/BudgetProgressCard.tsx @@ -47,6 +47,13 @@ const BudgetProgressCard: React.FC = ({ return () => clearTimeout(timeoutId); }, [budgetData]); + // 컴포넌트 마운트 시 월간 탭을 기본으로 설정 + useEffect(() => { + if (selectedTab !== 'monthly') { + setSelectedTab('monthly'); + } + }, []); + // budgetDataUpdated 이벤트 감지 useEffect(() => { const handleBudgetDataUpdated = () => { @@ -76,7 +83,7 @@ const BudgetProgressCard: React.FC = ({ return (
- + 0) { + // 월간 예산 기준으로 전달 onSaveBudget(totalBudget, updatedCategoryBudgets); setShowBudgetInput(false);