-
-
Save slightlytyler/fb9795505b965bc30d50fd557d8c9ec8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const offerFormSubmitDecorator = Component => { | |
return connect( | |
state => ({ offerID: state.offer.get('pk') }), | |
dispatch => ({ patchOfferCall: (offerId, values) => dispatch(actions.patchOfferCall(offerId, values)) }), | |
(stateProps, dispatchProps) => ({ | |
...stateProps, | |
onSubmit: values => dispatchProps.patchOfferCall(stateProps.offerId, values), | |
}) | |
) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment