Fixes bug where some toasts would reappear after being closed

This commit is contained in:
mabashian
2021-02-15 15:48:04 -05:00
parent 83a9c3470e
commit d96383b317

View File

@@ -114,7 +114,9 @@ function NotificationTemplatesList({ i18n }) {
}, []); }, []);
const removeTestToast = notificationId => { const removeTestToast = notificationId => {
setTestToasts(testToasts.filter(toast => toast.id !== notificationId)); setTestToasts(oldToasts =>
oldToasts.filter(toast => toast.id !== notificationId)
);
}; };
const canAdd = actions && actions.POST; const canAdd = actions && actions.POST;