import React from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; import { withNamespaces, Trans } from 'react-i18next'; import flow from 'lodash/flow'; import i18n from '../../i18n'; import Controls from './Controls'; import renderField from './renderField'; const required = (value) => { if (value || value === 0) { return false; } return form_error_required; }; const validate = (values) => { const errors = {}; if (values.confirm_password !== values.password) { errors.confirm_password = i18n.t('form_error_password'); } return errors; }; const Auth = (props) => { const { handleSubmit, pristine, invalid, t, } = props; return (
install_auth_title

install_auth_desc

); }; Auth.propTypes = { handleSubmit: PropTypes.func.isRequired, pristine: PropTypes.bool.isRequired, invalid: PropTypes.bool.isRequired, t: PropTypes.func.isRequired, }; export default flow([ withNamespaces(), reduxForm({ form: 'install', destroyOnUnmount: false, forceUnregisterOnUnmount: true, validate, }), ])(Auth);