Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderSuccess () {
// Manually destroy registration forms
this.props.dispatch(destroy('registrationPartOne'))
this.props.dispatch(destroy('registrationPartTwo'))
this.props.dispatch(destroy('registrationPartThree'))
return (
<div data-automation-id="registration_success_modal">
<form>
<h2></h2>
<p>
{this.props.categoryCode === 'REGBARN'
? <span data-automation-id="category">
<br>
<br>
</span>
: <span data-automation-id="category">
<br>
<br></span></p></form></div>
name: type,
status: CONSTANTS.status.uploaded
};
dispatch({
type: UPLOAD_FEEDBACK_REQUEST,
payload: requestPayload,
meta: {
offline: {
effect: { url, body: form, method: 'POST', headers },
commit: { type: UPLOAD_FEEDBACK_COMMIT, meta: { feedback: commitPayload } },
rollback: { type: UPLOAD_FEEDBACK_ROLLBACK } // TODO: MARK AS UNSYNC TO TRY AGAIN
}
}
});
dispatch(destroy(type));
};
}
export const closeDialog = () => (dispatch) => {
dispatch({
type: LINK_DIALOG_CLOSE,
});
dispatch(destroy('linkDialog')); // destroy form manually
};
renderSuccess () {
// Manually destroy registration forms
this.props.dispatch(destroy('registrationPartOne'))
this.props.dispatch(destroy('registrationPartTwo'))
this.props.dispatch(destroy('registrationPartThree'))
return (
<div data-automation-id="registration_success_modal">
<form>
<h2></h2>
<p>
{this.props.categoryCode === 'REGBARN'
? <span data-automation-id="category">
<br>
<br>
</span>
: <span data-automation-id="category">
<br>
<br>
</span>
}</p></form></div>
it('resets the form when the LOCATION_CHANGE action has no state', () => {
const saga = handleLocationChange({
type: LOCATION_CHANGE,
payload: { pathname: '/comments/create' },
});
expect(saga.next().value).toEqual(put(resetForm()));
expect(saga.next().value).toEqual(put(destroy(REDUX_FORM_NAME)));
});
destroyWizardForm: () => destroy(WIDGET_WIZARD_FORM),
hideModalAction,
export function* handleLocationChange({ payload }) {
if (payload.state && payload.state.skipFormReset) {
return;
}
if (isEqual(payload, previousLocation)) {
return;
}
previousLocation = payload;
yield put(resetForm());
yield put(destroy(REDUX_FORM_NAME));
}
.then((res) => {
history.goBack();
dispatch(destroy('CampaignPage'));
return res;
})
.catch((err) => {
destroyWizardForm: () => destroy(WIDGET_WIZARD_FORM),
},
resetConfigForm: () => {
dispatch(destroy("onPremConfigForm"));
},
fetchConfiguredNodeList: (pUUID) => {