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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user