Fix: Prevent data reset without login

The data reset functionality was incorrectly prompting for login even when the user was already logged in. This commit ensures that data reset operations are only triggered when a user is authenticated.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-16 09:24:41 +00:00
parent f7ad2b6d42
commit 351b5e6d36
4 changed files with 36 additions and 74 deletions

View File

@@ -1,3 +1,4 @@
import React, { useState } from 'react';
import { Trash2, Loader2 } from 'lucide-react';
import { Button } from '@/components/ui/button';
@@ -79,7 +80,6 @@ const DataResetSection = () => {
toast({
title: "모든 데이터가 초기화되었습니다.",
description: "모든 예산, 지출 내역, 설정이 초기화되었습니다.",
duration: 3000
});
setIsResetDialogOpen(false);
console.log('모든 데이터 초기화 완료');
@@ -93,7 +93,6 @@ const DataResetSection = () => {
title: "데이터 초기화 실패",
description: "데이터를 초기화하는 중 문제가 발생했습니다.",
variant: "destructive",
duration: 4000
});
} finally {
setIsResetting(false);