From 0336cafd148221abd38db60c843f1e3f765f1ba0 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Tue, 7 Nov 2017 12:52:37 -0500 Subject: [PATCH 1/3] Split up render method --- src/routes/AppPage.js | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/src/routes/AppPage.js b/src/routes/AppPage.js index f09dbba..1df934a 100644 --- a/src/routes/AppPage.js +++ b/src/routes/AppPage.js @@ -20,27 +20,43 @@ export const AppPage = createReactClass({ }, render() { + if (this.state.bbox.length) { + return this.renderApp(); + } + + return this.renderLoading(); + }, + + renderLoading() { + return ( +
+

Loading {this.props.params.siteKey} watcher...

+
+ ); + }, + + renderApp() { return ( - this.state.bbox.length ? -
-