import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { reduxForm, formValueSelector } from 'redux-form'; import { Trans, withTranslation } from 'react-i18next'; import flow from 'lodash/flow'; import Controls from './Controls'; import { FORM_NAME } from '../../helpers/constants'; let Submit = (props) => (

install_submit_title

install_submit_desc

); Submit.propTypes = { webIp: PropTypes.string.isRequired, webPort: PropTypes.number.isRequired, handleSubmit: PropTypes.func.isRequired, pristine: PropTypes.bool.isRequired, submitting: PropTypes.bool.isRequired, openDashboard: PropTypes.func.isRequired, }; const selector = formValueSelector('install'); Submit = connect((state) => { const webIp = selector(state, 'web.ip'); const webPort = selector(state, 'web.port'); return { webIp, webPort, }; })(Submit); export default flow([ withTranslation(), reduxForm({ form: FORM_NAME.INSTALL, destroyOnUnmount: false, forceUnregisterOnUnmount: true, }), ])(Submit);