()
| 106 | }; |
| 107 | |
| 108 | const markAllAsRead = async () => { |
| 109 | try { |
| 110 | await fetch("/api/notifications", { |
| 111 | method: "PATCH", |
| 112 | headers: { "Content-Type": "application/json" }, |
| 113 | body: JSON.stringify({ action: "markAllRead" }), |
| 114 | }); |
| 115 | await fetchNotifications(); |
| 116 | } catch (error) { |
| 117 | console.error("Failed to mark all as read:", error); |
| 118 | } |
| 119 | }; |
| 120 | |
| 121 | const deleteNotification = async (id: string) => { |
| 122 | try { |
nothing calls this directly
no test coverage detected