Skip to content

Commit

Permalink
Double check auto start conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
iyannsch committed Nov 7, 2024
1 parent 803e182 commit 15244d5
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions node/landing-page/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,17 @@ function App(): JSX.Element {
}

useEffect(() => {
console.log('App init changed');
if (!initialized) {
console.log('Not initialized yet');
return;
}

if (config.useKeycloak && !username) {
console.log('No username set yet but required');
return;
}

console.log('App init or username changed');
console.log('Selected app definition: ' + selectedAppDefinition);
console.log('Selected app name: ' + selectedAppName);
console.log('Configured app definition: ' + config.appDefinition);
Expand All @@ -158,22 +168,17 @@ function App(): JSX.Element {
console.log('Artemis Token: ' + artemisToken);
console.log('-----------------------------------');

if (!initialized) {
console.log('Not initialized yet');
return;
}

if (selectedAppDefinition && gitUri && artemisToken && !loading) {
console.log('Checking auth, setting autoStart to true');
//authenticate();
// authenticate();
setAutoStart(true);
// handleStartSession(selectedAppDefinition);
handleStartSession(selectedAppDefinition);
} else {
console.log('Setting autoStart to false');
setAutoStart(false);
}

}, [initialized]);
}, [initialized, username]);

useEffect(() => {
console.log('Auto start changed: ' + autoStart);
Expand Down

0 comments on commit 15244d5

Please sign in to comment.