import React, { useState } from 'react'; import { Trash2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { useAuth } from '@/contexts/auth'; import { useDataReset } from '@/hooks/useDataReset'; import DataResetDialog from './DataResetDialog'; import { isSyncEnabled } from '@/utils/sync/syncSettings'; import { toast } from '@/hooks/useToast.wrapper'; const DataResetSection = () => { const [isResetDialogOpen, setIsResetDialogOpen] = useState(false); const { user } = useAuth(); const { isResetting, resetAllData } = useDataReset(); const syncEnabled = isSyncEnabled(); const handleResetAllData = async () => { await resetAllData(); setIsResetDialogOpen(false); // 데이터 초기화 후 애플리케이션 리로드 // toast 알림은 useDataReset.ts에서 처리하므로 여기서는 제거 }; return ( <>
{user ? "로컬 및 클라우드의 모든 예산, 지출 내역이 초기화됩니다. 동기화 설정은 비활성화됩니다." : "모든 예산, 지출 내역, 설정이 초기화됩니다."}