aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/AuthLayoutContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/auth/AuthLayoutContainer.js')
-rw-r--r--src/containers/auth/AuthLayoutContainer.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/containers/auth/AuthLayoutContainer.js b/src/containers/auth/AuthLayoutContainer.js
index a25a1fd5e..b73598f3d 100644
--- a/src/containers/auth/AuthLayoutContainer.js
+++ b/src/containers/auth/AuthLayoutContainer.js
@@ -5,6 +5,7 @@ import { inject, observer } from 'mobx-react';
5import AuthLayout from '../../components/auth/AuthLayout'; 5import AuthLayout from '../../components/auth/AuthLayout';
6import AppStore from '../../stores/AppStore'; 6import AppStore from '../../stores/AppStore';
7import GlobalErrorStore from '../../stores/GlobalErrorStore'; 7import GlobalErrorStore from '../../stores/GlobalErrorStore';
8import AppLoader from '../../components/ui/AppLoader';
8 9
9import { oneOrManyChildElements } from '../../prop-types'; 10import { oneOrManyChildElements } from '../../prop-types';
10 11
@@ -18,17 +19,27 @@ export default @inject('stores', 'actions') @observer class AuthLayoutContainer
18 19
19 render() { 20 render() {
20 const { stores, actions, children, location } = this.props; 21 const { stores, actions, children, location } = this.props;
22 const { app, features, globalError } = stores;
23
24 const isLoadingBaseFeatures = features.defaultFeaturesRequest.isExecuting
25 && !features.defaultFeaturesRequest.wasExecuted;
26
27 if (isLoadingBaseFeatures) {
28 return (
29 <AppLoader />
30 );
31 }
21 32
22 return ( 33 return (
23 <AuthLayout 34 <AuthLayout
24 error={stores.globalError.response} 35 error={globalError.response}
25 pathname={location.pathname} 36 pathname={location.pathname}
26 isOnline={stores.app.isOnline} 37 isOnline={app.isOnline}
27 isAPIHealthy={!stores.app.healthCheckRequest.isError} 38 isAPIHealthy={!app.healthCheckRequest.isError}
28 retryHealthCheck={actions.app.healthCheck} 39 retryHealthCheck={actions.app.healthCheck}
29 isHealthCheckLoading={stores.app.healthCheckRequest.isExecuting} 40 isHealthCheckLoading={app.healthCheckRequest.isExecuting}
30 isFullScreen={stores.app.isFullScreen} 41 isFullScreen={app.isFullScreen}
31 darkMode={stores.app.isSystemDarkModeEnabled} 42 darkMode={app.isSystemDarkModeEnabled}
32 > 43 >
33 {children} 44 {children}
34 </AuthLayout> 45 </AuthLayout>