From 206bbc6b1c8889bdb2949817e11127e1ab5a0616 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 10 Sep 2017 21:17:29 +0200 Subject: [PATCH] Update expanded state --- src/components/HostnameInput.jsx | 4 ++-- src/components/ServerConfigInput.jsx | 2 +- src/containers/HostnameController.js | 3 ++- src/containers/ServerConfigController.js | 8 +++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/HostnameInput.jsx b/src/components/HostnameInput.jsx index b757014..2a46d7d 100644 --- a/src/components/HostnameInput.jsx +++ b/src/components/HostnameInput.jsx @@ -59,9 +59,9 @@ class Component extends PureComponent { ) } - + // console.error("-----", this.props) return ( - +
diff --git a/src/containers/HostnameController.js b/src/containers/HostnameController.js index 06c1cef..db78725 100644 --- a/src/containers/HostnameController.js +++ b/src/containers/HostnameController.js @@ -4,7 +4,8 @@ import HostnameInput from '../components/HostnameInput' import API from '../utils/API' const mapStateToProps = (state) => ({ - serverError: state.serverError + serverError: state.serverError, + expanded: !state.token }) const mapDispatchToProps = { diff --git a/src/containers/ServerConfigController.js b/src/containers/ServerConfigController.js index 791b708..81f3cbc 100644 --- a/src/containers/ServerConfigController.js +++ b/src/containers/ServerConfigController.js @@ -1,15 +1,17 @@ import { connect } from 'react-redux' import ServerConfigInput from '../components/ServerConfigInput' -// import { discoveryStart } from '../actions/' +import actions from '../actions/' import API from '../utils/API' const mapStateToProps = (state) => ({ - serverConfig: state.serverConfig + serverConfig: state.serverConfig, + expanded: !state.token }) const mapDispatchToProps = { authenticateStart: API.authenticate, - logoutStart: API.logout + logoutStart: API.logout, + updateConfig: actions.discovery.completed } const Controller = connect( -- GitLab