diff --git a/src/contexts/UiContext.js b/src/contexts/UiContext.js index ee666f13d..ffbe250d0 100644 --- a/src/contexts/UiContext.js +++ b/src/contexts/UiContext.js @@ -111,8 +111,9 @@ const UiContextProvider = ({ children }) => { } const removeToast = (uids) => { - const removedIds = removeEntriesByIDs(toastsRef.current, uids) - setToasts([...removedIds]) + const remainingIds = removeEntriesByIDs(toastsRef.current, uids) + toastsRef.current = remainingIds + setToasts([...remainingIds]) } const addModal = (newModal) =>