From fddf1140768caa0bddfebb5af6db8f12895f47b6 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Sun, 19 Aug 2018 19:57:26 -0400 Subject: [PATCH] don't render anything until everything loads --- client/src/components/app.js | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/client/src/components/app.js b/client/src/components/app.js index 462211c4..275eb997 100644 --- a/client/src/components/app.js +++ b/client/src/components/app.js @@ -18,7 +18,8 @@ import SectionHeader from "./framework/sectionHeader"; @connect(state => { return { - cells: state.cells + cells: state.cells, + initialize: state.initialize }; }) class App extends React.Component { @@ -60,27 +61,27 @@ class App extends React.Component { } render() { - // console.log('app:', this.props, this.state) - return ( - {this.props.cells.loading ? ( + {this.props.cells.loading || this.props.initialize.loading ? (
- {/**/} - - loading cells - + loading cellxgene
) : null} {this.props.cells.error ? "Error loading cells" : null}
- + {this.props.cells.loading || this.props.initialize.loading ? null : ( + + )}
- + {this.props.cells.loading || + this.props.initialize.loading ? null : ( + + )} + {/**/}