diff --git a/embark-ui/src/components/Login.js b/embark-ui/src/components/Login.js index 54b0b3c6..ed400538 100644 --- a/embark-ui/src/components/Login.js +++ b/embark-ui/src/components/Login.js @@ -24,6 +24,9 @@ class Login extends React.Component {

Login

+ {this.props.error && +

{this.props.error}

+ }
this.handleSubmit(e)}>
diff --git a/embark-ui/src/containers/AppContainer.js b/embark-ui/src/containers/AppContainer.js index 6af1115a..6c32e03b 100644 --- a/embark-ui/src/containers/AppContainer.js +++ b/embark-ui/src/containers/AppContainer.js @@ -75,25 +75,23 @@ class AppContainer extends Component { } } - render() { - let content; + renderBody() { if (this.shouldRenderLogin()) { - content = ; - } else { - content = this.toggleTheme()} - currentTheme={this.props.theme}> - {routes} - ; + return ; } - return ( -
- {content} -
+ this.toggleTheme()} + currentTheme={this.props.theme}> + {routes} + ); } + + render() { + return
{this.renderBody()}
; + } } AppContainer.propTypes = { @@ -111,7 +109,7 @@ AppContainer.propTypes = { location: PropTypes.object, theme: PropTypes.string, changeTheme: PropTypes.func, - fetchTheme: PropTypes.func + fetchTheme: PropTypes.func, }; function mapStateToProps(state) { @@ -119,7 +117,7 @@ function mapStateToProps(state) { initialized: getVersions(state).length > 0, credentials: getCredentials(state), authenticationError: getAuthenticationError(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/embark-ui/src/sagas/index.js b/embark-ui/src/sagas/index.js index e69a7eb5..1988a0d0 100644 --- a/embark-ui/src/sagas/index.js +++ b/embark-ui/src/sagas/index.js @@ -14,7 +14,7 @@ function *doRequest(entity, serviceFn, payload) { if(response) { yield put(entity.success(response.data, payload)); } else if (error) { - yield put(entity.failure(error.message)); + yield put(entity.failure(error.message || error)); } }