import React from 'react'; import { useNavigate } from 'react-router-dom'; import NavBar from '@/components/NavBar'; import SyncSettings from '@/components/SyncSettings'; import AppVersionInfo from '@/components/AppVersionInfo'; import { User, CreditCard, Bell, Lock, HelpCircle, LogOut, ChevronRight } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useAuth } from '@/contexts/auth'; import { useToast } from '@/hooks/useToast.wrapper'; import SafeAreaContainer from '@/components/SafeAreaContainer'; const SettingsOption = ({ icon: Icon, label, description, onClick, color = "text-neuro-income", disabled = false }: { icon: React.ElementType; label: string; description?: string; onClick?: () => void; color?: string; disabled?: boolean; }) => { return

{label}

{description &&

{description}

}
; }; const Settings = () => { const navigate = useNavigate(); const { user, signOut } = useAuth(); const { toast } = useToast(); const handleLogout = async () => { await signOut(); navigate('/login'); }; const handleClick = (path: string) => { navigate(path); }; return (
{/* Header */}

설정

{/* User Profile */}
{user ?

{user.user_metadata?.username || '사용자'}

{user.email}

:

로그인 필요

계정에 로그인하세요

}
{/* Data Sync Settings */}
{/* Settings Options */}

계정

user ? navigate('/profile') : navigate('/login')} /> user ? navigate('/payment-methods') : navigate('/login')} /> user ? navigate('/notifications') : navigate('/login')} />

앱 설정

navigate('/security-privacy')} /> navigate('/help-support')} />
navigate('/login')} />
{/* 맨 아래 추가 여백 100px */}
); }; export default Settings;