(alertId: string)
| 60 | } |
| 61 | |
| 62 | const dismissAlert = async (alertId: string) => { |
| 63 | try { |
| 64 | await fetch(`/api/orgs/${organizationId}/alerts/${alertId}/dismiss`, { |
| 65 | method: 'POST', |
| 66 | }) |
| 67 | |
| 68 | setAlerts(alerts.filter((alert) => alert.id !== alertId)) |
| 69 | } catch (error) { |
| 70 | console.error('Error dismissing alert:', error) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | const getAlertIcon = (type: string, severity: string) => { |
| 75 | if (severity === 'critical') { |
no test coverage detected