0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Merge branch 'experimentalNotificationDB' of https://github.com/G-Ambatte/homebrewery into pr/2586

This commit is contained in:
Trevor Buckner
2024-09-18 15:50:55 -04:00

View File

@@ -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);