Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(state, ownProps) => ({
isValid: isValid(ownProps.formName)(state),
isDirty: isDirty(ownProps.formName)(state),
submitErrors: getFormSubmitErrors(ownProps.formName)(state)
}),
{
const mapStateToProps = state => ({
fieldIds: selectors.qEditor.getFieldIds(state),
getField: selectors.qEditor.getFieldById(state),
getLinkableFields: selectors.questionnaire.getLinkableFields(state),
editing: selectors.qEditor.getEditingField(state),
section: selectors.qEditor.getSelectedSection(state),
questionnaire: selectors.qEditor.getEditingQuestionnaire(state),
submitSucceeded: hasSubmitSucceeded(FORM_NAME)(state),
isValid: isValid(FORM_NAME)(state),
isPristine: isPristine(FORM_NAME)(state)
})
(state) => ({
projectId: activeProjectSelector(state),
widgetSettings: getFormValues(WIDGET_WIZARD_FORM)(state),
dirty: isDirty(WIDGET_WIZARD_FORM)(state),
valid: isValid(WIDGET_WIZARD_FORM)(state),
}),
{
function isActiveFormValid(state) {
const form = getActiveForm(state);
if (!form) return false;
return !isPristine(state.externalForms.activeForm, selectReduxFormState)(state) &&
isValid(state.externalForms.activeForm, selectReduxFormState)(state);
}
const mapStateToProps = (state, ownProps) => ({
customer: getCustomer(state),
project: getProject(state),
total: pricesSelector(state, ownProps).total,
formData: getFormValues('marketplaceOffering')(state),
formValid: isValid('marketplaceOffering')(state),
});
const mapStateToProps = (state, ownProps) => {
const formData: any = getFormValues('marketplaceOffering')(state);
return {
formData: formData && formData.attributes || {attributes: {}},
formValid: isValid('marketplaceOffering')(state),
customer: getCustomer(state),
project: getProject(state),
total: pricesSelector(state, ownProps).total,
};
};