From 77c4ac6640f0966ab558bade2b5acd03f534b1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 18 Sep 2024 21:47:03 +0200 Subject: [PATCH] deleting useless state --- .../notificationLookup/notificationLookup.jsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/client/admin/notificationUtils/notificationLookup/notificationLookup.jsx b/client/admin/notificationUtils/notificationLookup/notificationLookup.jsx index 1186cce7a..7decea909 100644 --- a/client/admin/notificationUtils/notificationLookup/notificationLookup.jsx +++ b/client/admin/notificationUtils/notificationLookup/notificationLookup.jsx @@ -31,7 +31,6 @@ const NotificationDetail = ({ notification, onDelete })=>( ); const NotificationLookup = ()=>{ - const [foundNotification, setFoundNotification] = useState(null); const [searching, setSearching] = useState(false); const [error, setError] = useState(null); const [notifications, setNotifications] = useState([]); @@ -64,10 +63,6 @@ const NotificationLookup = ()=>{ console.log('Delete notification confirm'); try { await request.delete(`/admin/notification/delete/${dismissKey}`); - // Only reset the foundNotification if it matches the one being deleted - if(foundNotification && foundNotification.dismissKey === dismissKey) { - setFoundNotification(null); - } lookupAll(); } catch (err) { console.log(err);