'use client'; import { useEffect, useState } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { ChevronLeft, Bell, Package, Heart, Store, Radio, Users, Sparkles, ShoppingBag } from 'lucide-react'; import { useAuth } from '@/components/auth-provider'; import { PageSkeleton } from '@/components/page-skeleton'; interface Notification { id: string; type: 'order' | 'like' | 'follow' | 'live' | 'group_buy' | 'system' | 'product'; title: string; body: string; timestamp: string; read: boolean; href?: string; } export default function NotificationsPage() { const { user, loading: authLoading } = useAuth(); const router = useRouter(); const [notifications, setNotifications] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { if (!authLoading && !user) { router.push('/login?next=/notifications'); return; } if (user) { // TODO: Replace with real notifications API // For now, show a welcome notification setNotifications([ { id: '1', type: 'system', title: 'Welcome to Cellex!', body: 'Thanks for joining. Browse products, watch videos, and discover deals.', timestamp: '2m ago', read: false, href: '/', }, ]); setLoading(false); } }, [user, authLoading, router]); if (authLoading || loading) { return ( ); } const getIcon = (type: string) => { switch (type) { case 'order': return ShoppingBag; case 'like': return Heart; case 'follow': return Users; case 'live': return Radio; case 'group_buy': return Users; case 'product': return Package; case 'system': return Sparkles; default: return Bell; } }; return (
{/* Top bar */}

Notifications

{/* Notifications list */} {notifications.length === 0 ? (

No notifications yet

When you get order updates, new followers, or deal alerts, they'll show up here.

Browse Products
) : (
{notifications.map((notif) => { const Icon = getIcon(notif.type); return (
{notif.title} {notif.timestamp}

{notif.body}

{!notif.read && ( )} ); })}
)}
); }