diff --git a/packages/components-faraday/src/components/MakeRecommendation/RecommendWizard.js b/packages/components-faraday/src/components/MakeRecommendation/RecommendWizard.js index e6c32a0804178d143311a24758fa323942205e14..28021cc18bf074e09b16a9952077dc75637c6306 100644 --- a/packages/components-faraday/src/components/MakeRecommendation/RecommendWizard.js +++ b/packages/components-faraday/src/components/MakeRecommendation/RecommendWizard.js @@ -3,6 +3,7 @@ import { get } from 'lodash' import { Icon } from '@pubsweet/ui' import { connect } from 'react-redux' import styled from 'styled-components' +import { actions } from 'pubsweet-client' import { compose, withState, withHandlers } from 'recompose' import { getFormValues, reset as resetForm } from 'redux-form' @@ -57,8 +58,9 @@ export default compose( decision: get(getFormValues('recommendation')(state), 'decision'), }), { - createRecommendation, resetForm, + createRecommendation, + getCollections: actions.getCollections, }, ), withState('step', 'changeStep', 0), @@ -75,11 +77,13 @@ export default compose( resetForm, fragmentId, collectionId, + getCollections, createRecommendation, }) => values => { const recommendation = utils.parseRecommendationValues(values) createRecommendation(collectionId, fragmentId, recommendation).then(r => { resetForm('recommendation') + getCollections() showModal({ title: 'Recommendation sent', })