import React from 'react'; import { ArrowLeft, Bell, CheckCircle2, MessageSquare, Ticket, Trash2 } from 'lucide-react'; import { useNavigate } from 'react-router-dom'; import useTicketStore from "../../store/ticketStore"; import { Card } from "../../components/ui/card"; import { Button } from "../../components/ui/button"; import { formatTicketId } from "../../utils/format"; const NotificationsPage = () => { const navigate = useNavigate(); const { notifications = [], markNotificationsRead } = useTicketStore(); const getIcon = (type) => { switch (type) { case 'resolution': return ; case 'message': return ; case 'new_ticket': return ; default: return ; } }; return (

Notifications

Keep track of your ticket updates and responses.

{notifications.length > 0 ? ( notifications.map((notif) => ( navigate(`/ticket/${notif.ticketId}`)} className={`p-6 rounded-2xl border transition-all cursor-pointer group flex gap-5 items-start ${!notif.read ? 'border-emerald-200 bg-emerald-50/20 shadow-sm' : 'border-gray-100 hover:border-gray-200'}`} >
{getIcon(notif.type)}

{notif.title}

{new Date(notif.timestamp).toLocaleString()}

{notif.message}

Ticket #{formatTicketId(notif.ticketId)} {!notif.read && ( )}
)) ) : (

No notifications yet

When your tickets get updated or support replies, you'll see them here.

)}
); }; export default NotificationsPage;