diff --git a/components/layout/notification-bell.tsx b/components/layout/notification-bell.tsx index c8a6426..2b54286 100644 --- a/components/layout/notification-bell.tsx +++ b/components/layout/notification-bell.tsx @@ -1,12 +1,18 @@ 'use client' import { useState, useRef, useEffect } from 'react' -import { Bell } from 'lucide-react' +import { Bell, X } from 'lucide-react' import { formatTimeAgo } from '@/lib/stream-utils' import { useWallet } from '@/hooks/use-wallet' import { useNotifications, type AppNotification } from '@/hooks/use-notifications' -function NotificationItem({ notification }: { notification: AppNotification }) { +function NotificationItem({ + notification, + onDismiss, +}: { + notification: AppNotification + onDismiss: (id: string) => void +}) { return (
{notification.title}
- {!notification.read && ( - - )} +{notification.body}
{formatTimeAgo(notification.timestamp)}
@@ -28,7 +43,7 @@ function NotificationItem({ notification }: { notification: AppNotification }) { export function NotificationBell() { const { address } = useWallet() - const { notifications, unreadCount, markAllRead, clearAll } = useNotifications(address) + const { notifications, unreadCount, markAllRead, clearAll, dismissNotification } = useNotifications(address) const [open, setOpen] = useState(false) const ref = useRef