()
| 130 | }; |
| 131 | |
| 132 | const clearRead = async () => { |
| 133 | try { |
| 134 | await fetch("/api/notifications?action=clearRead", { |
| 135 | method: "DELETE", |
| 136 | }); |
| 137 | await fetchNotifications(); |
| 138 | } catch (error) { |
| 139 | console.error("Failed to clear read notifications:", error); |
| 140 | } |
| 141 | }; |
| 142 | |
| 143 | const handleNotificationClick = (notification: Notification) => { |
| 144 | if (!notification.read) { |
nothing calls this directly
no test coverage detected