import React from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; import { Trans, withNamespaces } from 'react-i18next'; import flow from 'lodash/flow'; import { toggleAllServices } from '../../../helpers/helpers'; import { renderServiceField } from '../../../helpers/form'; import { SERVICES } from '../../../helpers/constants'; const Form = (props) => { const { handleSubmit, change, pristine, submitting, processing, processingSet, } = props; return (
{SERVICES.map(service => ( ))}
); }; Form.propTypes = { pristine: PropTypes.bool.isRequired, handleSubmit: PropTypes.func.isRequired, change: PropTypes.func.isRequired, submitting: PropTypes.bool.isRequired, processing: PropTypes.bool.isRequired, processingSet: PropTypes.bool.isRequired, t: PropTypes.func.isRequired, }; export default flow([ withNamespaces(), reduxForm({ form: 'servicesForm', enableReinitialize: true, }), ])(Form);