Fix new services implementation 8

This commit is contained in:
Urtzi Alfaro
2025-08-15 23:11:53 +02:00
parent 399ba80067
commit 055ce10c66
5 changed files with 161 additions and 80 deletions

View File

@@ -79,7 +79,10 @@ export const useRealAlerts = () => {
try {
// Get forecast alerts from backend
const forecastAlerts = await getForecastAlerts(tenantId);
const response = await getForecastAlerts(tenantId);
// Extract alerts array from paginated response
const forecastAlerts = response.alerts || [];
// Filter only active alerts
const activeAlerts = forecastAlerts.filter(alert => alert.is_active);