Hotfixes in ci/cd and notifications
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import './SavedNotifications.css';
|
||||
|
||||
function SavedNotifications({ onClose }) {
|
||||
function SavedNotifications({ onClose, onNotificationChange }) {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState(null);
|
||||
const [items, setItems] = useState([]);
|
||||
@@ -41,6 +41,7 @@ function SavedNotifications({ onClose }) {
|
||||
});
|
||||
if (!res.ok && res.status !== 204) throw new Error(`HTTP ${res.status}`);
|
||||
setItems(prev => prev.filter(i => !(i.scope === item.scope && i.id === item.id)));
|
||||
onNotificationChange?.();
|
||||
} catch (err) {
|
||||
setError(err.message || 'No se pudo eliminar la notificación');
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user