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.js25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/containers/auth/AuthLayoutContainer.js b/src/containers/auth/AuthLayoutContainer.js
index 004054fdd..b73598f3d 100644
--- a/src/containers/auth/AuthLayoutContainer.js
+++ b/src/containers/auth/AuthLayoutContainer.js
@@ -5,11 +5,11 @@ 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
11@inject('stores', 'actions') @observer 12export default @inject('stores', 'actions') @observer class AuthLayoutContainer extends Component {
12export default class AuthLayoutContainer extends Component {
13 static propTypes = { 13 static propTypes = {
14 children: oneOrManyChildElements.isRequired, 14 children: oneOrManyChildElements.isRequired,
15 location: PropTypes.shape({ 15 location: PropTypes.shape({
@@ -19,14 +19,27 @@ export default class AuthLayoutContainer extends Component {
19 19
20 render() { 20 render() {
21 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 }
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}
41 isFullScreen={app.isFullScreen}
42 darkMode={app.isSystemDarkModeEnabled}
30 > 43 >
31 {children} 44 {children}
32 </AuthLayout> 45 </AuthLayout>