From 91eaf720513924baf5bc978b2f12246f1a49e2b9 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 7 Feb 2019 16:09:12 +0300 Subject: [PATCH] Disable button on submit --- client/src/install/Setup/Controls.js | 18 ++++++++++++------ client/src/reducers/install.js | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/client/src/install/Setup/Controls.js b/client/src/install/Setup/Controls.js index 7a70398e..e3bfdd94 100644 --- a/client/src/install/Setup/Controls.js +++ b/client/src/install/Setup/Controls.js @@ -42,7 +42,11 @@ class Controls extends Component { @@ -73,11 +77,13 @@ class Controls extends Component { } render() { + const { install } = this.props; + return (
- {this.renderPrevButton(this.props.step)} - {this.renderNextButton(this.props.step)} + {this.renderPrevButton(install.step)} + {this.renderNextButton(install.step)}
); @@ -85,7 +91,7 @@ class Controls extends Component { } Controls.propTypes = { - step: PropTypes.number.isRequired, + install: PropTypes.object.isRequired, nextStep: PropTypes.func, prevStep: PropTypes.func, openDashboard: PropTypes.func, @@ -96,8 +102,8 @@ Controls.propTypes = { }; const mapStateToProps = (state) => { - const { step } = state.install; - const props = { step }; + const { install } = state; + const props = { install }; return props; }; diff --git a/client/src/reducers/install.js b/client/src/reducers/install.js index 08165072..7533f152 100644 --- a/client/src/reducers/install.js +++ b/client/src/reducers/install.js @@ -26,6 +26,7 @@ const install = handleActions({ }, { step: INSTALL_FIRST_STEP, processingDefault: true, + processingSubmit: false, web: { ip: '0.0.0.0', port: 80,