import React, { useState } from "react"; import { User, Mail, Phone, Calendar, MapPin, CreditCard, Globe, Lock } from "lucide-react"; import { useSelector } from "react-redux"; import { RootState } from "../../store"; import ChangePasswordModal from "./ChangePasswordModal"; const Settings: React.FC = () => { const { profile } = useSelector((state: RootState) => state.profile); const [modalOpen, setModalOpen] = useState(false); const fullName = `${profile?.firstName || ""} ${profile?.lastName || ""}`.trim(); const maskLast5 = (value: string) => { if (!value) return "N/A"; const str = value.toString(); const last5 = str.slice(-5); const masked = "X".repeat(str.length - 5) + last5; return masked; }; return (
{profile?.dob || "N/A"}
🎂 Age
{profile?.age || "N/A"}
{profile?.phone || "N/A"}
💬 Skype
{profile?.skype || "Not Linked"}
{profile?.paymentMethod || "N/A"}
💳 Payoneer
{maskLast5(profile?.payoneerAccount)}
🏦 Veem
{profile?.veemAccount || "N/A"}
{[profile?.address, profile?.city, profile?.state, profile?.country] .filter(Boolean) .join(", ") || "N/A"}