From 22f051ad570b0e10f39c5ac891f1bbe5cea8bd0d Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Wed, 28 Aug 2024 14:53:53 +0200 Subject: [PATCH] Add more debug and remove defaulted appDefinition --- node/landing-page/public/config.js | 2 +- node/landing-page/src/App.tsx | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/node/landing-page/public/config.js b/node/landing-page/public/config.js index 63620e22..2dd7a81c 100644 --- a/node/landing-page/public/config.js +++ b/node/landing-page/public/config.js @@ -3,7 +3,7 @@ window.theiaCloudConfig = { appName: 'Theia Blueprint', useKeycloak: false, serviceUrl: 'http://localhost:8081/service', - appDefinition: 'theia-cloud-demo', + //appDefinition: 'theia-cloud-demo', useEphemeralStorage: true // additionalApps: [ // { diff --git a/node/landing-page/src/App.tsx b/node/landing-page/src/App.tsx index f4d11ce1..2b058814 100644 --- a/node/landing-page/src/App.tsx +++ b/node/landing-page/src/App.tsx @@ -76,11 +76,6 @@ function App(): JSX.Element { setError('Invalid default selection value: ' + pathBlueprintSelection); console.error('Invalid default selection value: ' + pathBlueprintSelection); } - console.log('App initialization complete'); - console.log('Selected app definition: ' + selectedAppDefinition); - console.log('Selected app name: ' + selectedAppName); - console.log('Configured app definition: ' + config.appDefinition); - console.log('Initial app definition: ' + initialAppDefinition); } if (config.useKeycloak) { keycloakConfig = { @@ -118,9 +113,26 @@ function App(): JSX.Element { } else { console.log('Decided not to auto-start the session'); } + } else { + console.log('App already initialized'); + console.log('Selected app definition: ' + selectedAppDefinition); + console.log('Selected app name: ' + selectedAppName); + console.log('Configured app definition: ' + config.appDefinition); + console.log('Initial app definition: ' + initialAppDefinition); + console.log('-----------------------------------'); } // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + + useEffect(() => { + console.log('App init changed'); + console.log('Selected app definition: ' + selectedAppDefinition); + console.log('Selected app name: ' + selectedAppName); + console.log('Configured app definition: ' + config.appDefinition); + console.log('Initial app definition: ' + initialAppDefinition); + console.log('-----------------------------------'); + }, [initialized]); + /* eslint-enable react-hooks/rules-of-hooks */ document.title = `${selectedAppName} - Theia`;