Clear persistent data

Clear data that persists and is displayed in monthly graphs for analysis.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 22:59:37 +00:00
parent 829b7af80d
commit 2ba8fdc31b
3 changed files with 47 additions and 39 deletions

View File

@@ -11,6 +11,7 @@ import { formatCurrency, calculatePercentage } from '@/utils/formatters';
import { useBudget } from '@/contexts/BudgetContext';
import { useAuth } from '@/contexts/auth';
import { resetAllData } from '@/contexts/budget/storageUtils';
import { resetAllStorageData } from '@/utils/storageUtils';
// 메인 컴포넌트
const Index = () => {
@@ -29,8 +30,9 @@ const Index = () => {
// 화면이 처음 로드될 때 데이터 초기화
useEffect(() => {
// 데이터를 완전히 초기화
// 데이터를 완전히 초기화 (두 가지 초기화 함수 모두 호출)
resetAllData();
resetAllStorageData();
// 환영 다이얼로그 표시 여부 결정
const dontShowWelcome = localStorage.getItem('dontShowWelcome') === 'true';