fix
This commit is contained in:
@@ -72,6 +72,7 @@ export default function UserNotificationsPage() {
|
||||
);
|
||||
}
|
||||
setUnreadCount((prev) => Math.max(0, prev - 1));
|
||||
window.dispatchEvent(new Event('notification-received'));
|
||||
} catch (err) {
|
||||
console.error('Failed to mark as read:', err);
|
||||
}
|
||||
@@ -86,6 +87,7 @@ export default function UserNotificationsPage() {
|
||||
setNotifications((prev) => prev.map((n) => ({ ...n, read: true })));
|
||||
}
|
||||
setUnreadCount(0);
|
||||
window.dispatchEvent(new Event('notification-received'));
|
||||
} catch (err) {
|
||||
console.error('Failed to mark all as read:', err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user