Skip to content

Instantly share code, notes, and snippets.

View slightlytyler's full-sized avatar
💭
🤓 codin'

Tyler Martinez slightlytyler

💭
🤓 codin'
  • Cat City
View GitHub Profile
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),
})
)
};