From 5424002f109c6be3f4355170e36ba500bf7f067b Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 18 Oct 2021 07:24:36 -0500 Subject: map options to System component --- src/web/src/components/App.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/web/src/components/App.js b/src/web/src/components/App.js index d298de31..cd80774f 100644 --- a/src/web/src/components/App.js +++ b/src/web/src/components/App.js @@ -34,6 +34,7 @@ const initialState = { error: undefined }, applicationState: {}, + applicationOptions: {}, initialized: false, error: false, retriesExhausted: false, @@ -61,6 +62,10 @@ class App extends Component { appHub.on('state', (state) => { this.setState({ applicationState: state }); }); + + appHub.on('options', (options) => { + this.setState({ applicationOptions: options }) + }) appHub.onreconnecting(() => this.setState({ error: true, retriesExhausted: false })); appHub.onclose(() => this.setState({ error: true, retriesExhausted: true })); @@ -102,7 +107,7 @@ class App extends Component { }; render = () => { - const { login, applicationState = {}, error, initialized, retriesExhausted } = this.state; + const { login, applicationState = {}, applicationOptions = {}, error, initialized, retriesExhausted } = this.state; const { version = {}, server } = applicationState; const { isUpdateAvailable, current, latest } = version; @@ -237,7 +242,7 @@ class App extends Component { this.withTokenCheck()}/> this.withTokenCheck()}/> this.withTokenCheck()}/> - this.withTokenCheck()}/> + this.withTokenCheck()}/> this.withTokenCheck()}/> -- cgit v1.2.3