From b6b8e960be02d09c2b8032b0bb8578a477d1cddd Mon Sep 17 00:00:00 2001 From: Anca Ursachi <anca.ursachi@thinslices.com> Date: Wed, 31 Oct 2018 16:15:00 +0200 Subject: [PATCH] fix(dashboardPage): Take collections again after deleting draft. --- .../src/components/Dashboard/DashboardPage.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/components-faraday/src/components/Dashboard/DashboardPage.js b/packages/components-faraday/src/components/Dashboard/DashboardPage.js index 2aadccce5..0cdd9b5ee 100644 --- a/packages/components-faraday/src/components/Dashboard/DashboardPage.js +++ b/packages/components-faraday/src/components/Dashboard/DashboardPage.js @@ -34,6 +34,7 @@ export default compose( } }, { + getCollections: actions.getCollections, deleteCollection: actions.deleteCollection, }, ), @@ -52,15 +53,17 @@ export default compose( ({ journal, currentUser }) => ({ journal, currentUser }), ), withHandlers({ - deleteCollection: ({ setFetching, deleteCollection }) => collection => ({ - hideModal, - setModalError, - }) => { + deleteCollection: ({ + setFetching, + deleteCollection, + getCollections, + }) => collection => ({ hideModal, setModalError }) => { setFetching(true) deleteCollection(collection) .then(() => { setFetching(false) hideModal() + getCollections() }) // again, the error is not being thrown from deleteCollection action and // the catch is never run -- GitLab