-
-
Save tstirrat15/a5fa88698151ca2370aba7b17d2e6502 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 onSubmit = (values, dispatch, props) => ( | |
dispatch(patchOfferCall(props.offerID, values)) | |
); | |
const mapStateToProps = state => ({ offerID: state.offer.get('pk') }); | |
export const offerFormSubmitDecorator = component => { | |
const connectedComponent = connect(mapStateToProps)(component); | |
return (props) => <connectedComponent {...props} onSubmit={onSubmit} />; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment