+
- {/* Header */}
- {/* Security Settings */}
-
- {/* Data Reset Section */}
+
-
- {/* Save Button */}
-
+
+
);
diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx
index 83fc951..772a1c4 100644
--- a/src/pages/Settings.tsx
+++ b/src/pages/Settings.tsx
@@ -1,3 +1,4 @@
+
import React from 'react';
import { useNavigate } from 'react-router-dom';
import NavBar from '@/components/NavBar';
@@ -52,17 +53,8 @@ const Settings = () => {
navigate('/login');
};
- const handleProtectedRouteClick = (path: string, label: string) => {
- if (!user) {
- toast({
- title: "로그인 필요",
- description: `${label}에 접근하려면 로그인이 필요합니다.`,
- variant: "destructive",
- });
- navigate('/login');
- } else {
- navigate(path);
- }
+ const handleClick = (path: string) => {
+ navigate(path);
};
return
@@ -112,19 +104,19 @@ const Settings = () => {
icon={User}
label="프로필 관리"
description="프로필 및 비밀번호 설정"
- onClick={() => handleProtectedRouteClick('/profile', '프로필 관리')}
+ onClick={() => user ? navigate('/profile') : navigate('/login')}
/>
handleProtectedRouteClick('/payment-methods', '결제 방법')}
+ onClick={() => user ? navigate('/payment-methods') : navigate('/login')}
/>
handleProtectedRouteClick('/notifications', '알림 설정')}
+ onClick={() => user ? navigate('/notifications') : navigate('/login')}
/>
@@ -134,7 +126,8 @@ const Settings = () => {
icon={Lock}
label="보안 및 개인정보"
description="보안 및 데이터 설정"
- onClick={() => handleProtectedRouteClick('/security-privacy', '보안 및 개인정보')}
+ // 로그인 상태와 관계없이 접근 가능하도록 변경
+ onClick={() => navigate('/security-privacy')}
/>