diff --git a/frontend/src/pages/Communication.jsx b/frontend/src/pages/Communication.jsx index f6f8d92..ac75c33 100644 --- a/frontend/src/pages/Communication.jsx +++ b/frontend/src/pages/Communication.jsx @@ -718,6 +718,16 @@ export default function Communication() { setBcSending(false); }; + // ── Supprimer une notification ──────────────────────────────────────────── + const deleteNotif = async (id) => { + try { + await api.del(`/notifications/${id}`); + setNotifs(prev => prev.filter(n => n.id !== id)); + setSelectedNotif(null); + window.dispatchEvent(new CustomEvent('notif:refresh')); + } catch { /* silencieux */ } + }; + // ── Marquer toutes notifs lues ─────────────────────────────────────── const markAllRead = async () => { try { @@ -1200,17 +1210,43 @@ export default function Communication() { {selectedNotif.body && ( -
+
{selectedNotif.body}
)} - {selectedNotif.link && ( -
+
+ + {selectedNotif.link && ( -
- )} + )} +
)}