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, Smartphone, } from "lucide-react"; import { cn } from "@/lib/utils"; import { useAuth } from "@/hooks/auth/useClerkAuth"; import { useToast } from "@/hooks/useToast.wrapper"; import SafeAreaContainer from "@/components/SafeAreaContainer"; // 개발 모드 체크 const isDevelopment = process.env.NODE_ENV === "development"; 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 { isSignedIn, userId } = useAuth(); const { toast: _toast } = useToast(); const handleLogout = async () => { // Clerk의 signOut은 다른 방식으로 처리됨 // 현재는 Mock 환경이므로 단순히 로그인 페이지로 이동 navigate("/login"); }; const _handleClick = (path: string) => { navigate(path); }; return (
{/* Header */}

설정

{/* User Profile */}
{isSignedIn ? (

사용자

{userId ? `ID: ${userId.substring(0, 8)}...` : "인증됨"}

) : (

로그인 필요

계정에 로그인하세요

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

계정

isSignedIn ? navigate("/profile") : navigate("/login") } /> isSignedIn ? navigate("/payment-methods") : navigate("/login") } /> isSignedIn ? navigate("/notifications") : navigate("/login") } />

앱 설정

navigate("/security-privacy")} /> navigate("/help-support")} /> {isDevelopment && ( navigate("/pwa-debug")} color="text-blue-500" /> )}
navigate("/login")} />
{/* 맨 아래 추가 여백 100px */}
); }; export default Settings;