Skip to content
Snippets Groups Projects
Commit b6b8e960 authored by Anca Ursachi's avatar Anca Ursachi
Browse files

fix(dashboardPage): Take collections again after deleting draft.

parent 94538c92
No related branches found
No related tags found
2 merge requests!136Sprint 22 features (updates),!135Hin 1111
...@@ -34,6 +34,7 @@ export default compose( ...@@ -34,6 +34,7 @@ export default compose(
} }
}, },
{ {
getCollections: actions.getCollections,
deleteCollection: actions.deleteCollection, deleteCollection: actions.deleteCollection,
}, },
), ),
...@@ -52,15 +53,17 @@ export default compose( ...@@ -52,15 +53,17 @@ export default compose(
({ journal, currentUser }) => ({ journal, currentUser }), ({ journal, currentUser }) => ({ journal, currentUser }),
), ),
withHandlers({ withHandlers({
deleteCollection: ({ setFetching, deleteCollection }) => collection => ({ deleteCollection: ({
hideModal, setFetching,
setModalError, deleteCollection,
}) => { getCollections,
}) => collection => ({ hideModal, setModalError }) => {
setFetching(true) setFetching(true)
deleteCollection(collection) deleteCollection(collection)
.then(() => { .then(() => {
setFetching(false) setFetching(false)
hideModal() hideModal()
getCollections()
}) })
// again, the error is not being thrown from deleteCollection action and // again, the error is not being thrown from deleteCollection action and
// the catch is never run // the catch is never run
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment