'use client' import { useRouter } from 'next/navigation' import Link from 'next/link' import { useAuth } from '@/lib/AuthContext' import { ChevronRight, ShoppingBag, HandHeart, MessageSquareText, MapPin, Flame, Bell, Sun, Crown, LogOut, Wallet, } from 'lucide-react' /* ─── Quick Actions ──────────────────────────────────────────── */ const QUICK_ACTIONS = [ { href: '/souq', icon: ShoppingBag, label: 'Souq' }, { href: '/waqf', icon: HandHeart, label: 'Waqf' }, { href: '/forum', icon: MessageSquareText, label: 'Forum' }, { href: '/halal-monitor', icon: MapPin, label: 'Halal Monitor' }, ] /* ─── Settings Items ─────────────────────────────────────────── */ const SETTINGS = [ { icon: Flame, label: 'Spirituality Stats', value: 'N/A', color: 'text-orange-400', }, { icon: Bell, label: 'Notifications', value: '', color: 'text-[#999]', }, { icon: Sun, label: 'Appearance', value: 'Dark Mode', color: 'text-[#999]', }, { icon: Crown, label: 'Upgrade to Pro', value: '', color: 'text-[#D4AF37]', gold: true, }, ] /* ─── Component ──────────────────────────────────────────────── */ export default function ProfilePage() { const router = useRouter() const { user, loading } = useAuth() const handleSignOut = () => { if (typeof window !== 'undefined') { localStorage.clear() } router.push('/login') } if (loading) { return (
) } const displayName = user?.name || 'Guest' const initial = displayName.charAt(0).toUpperCase() const flhBalance = user?.flhBalance ?? 0 const usdValue = (flhBalance * 0.004).toFixed(2) return (
{/* Scrollable content */}
{/* ═══ Profile Header ═══ */}
{/* Avatar */}
{initial}
{/* Name + badges */}

{displayName}

{user?.email}

{user?.isPremium && ( Premium )} {user?.isPro && ( Pro )} {user?.experienceLevel && ( {user.experienceLevel} )}
{/* ═══ FLH Wallet Card ═══ */}

FLH Wallet

{flhBalance.toLocaleString()} ≈ ${usdValue} USD
{/* ═══ Quick Action Grid (2x2) ═══ */}

Quick Actions

{QUICK_ACTIONS.map((action) => { const Icon = action.icon return (

{action.label}

) })}
{/* ═══ Settings List ═══ */}

Settings

{SETTINGS.map((item, idx) => { const Icon = item.icon return ( ) })}
{/* ═══ Sign Out / Login ═══ */}
{!user ? ( Login ) : ( )}
{/* Bottom spacer */}
) }