diff --git a/ui/src/index.js b/ui/src/index.js index 3370a1ce5f..bd5160a30d 100644 --- a/ui/src/index.js +++ b/ui/src/index.js @@ -74,12 +74,19 @@ window.addEventListener('keyup', event => { const history = syncHistoryWithStore(browserHistory, store) const Root = React.createClass({ + getInitialState() { + return { + ready: false, + } + }, + async componentWillMount() { this.flushErrorsQueue() try { await this.getLinks() - this.checkAuth() + await this.checkAuth() + this.setState({ready: true}) } catch (error) { dispatch(errorThrown(error)) } @@ -115,48 +122,66 @@ const Root = React.createClass({ }, render() { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + return !this.state.ready // eslint-disable-line no-negated-condition + ?
+ : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - ) + + + }, })