Skip to content

Commit

Permalink
Add debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
iyannsch committed Aug 28, 2024
1 parent 9e767d7 commit 274e76c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions node/landing-page/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,19 @@ function App(): JSX.Element {
setSelectedAppDefinition((element as HTMLSelectElement).value);
} else {
// If there are no additional apps, just use the application id as the name
console.log('App definitition provided via URL parameter not found in additional apps');
setSelectedAppDefinition(pathBlueprintSelection);
setSelectedAppName(pathBlueprintSelection);
}
initialAppName = selectedAppName;
initialAppDefinition = selectedAppDefinition;
console.log('Set ' + pathBlueprintSelection + ' as selection');
} else {
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 = {
Expand Down Expand Up @@ -108,9 +111,12 @@ function App(): JSX.Element {
});
}

// Try to start the app if the app definition is set
if (selectedAppDefinition) {
// Try to start the app if the app definition was changed via URL parameter
if (selectedAppDefinition && selectedAppDefinition !== initialAppDefinition) {
console.log('Starting session for ' + selectedAppDefinition);
//handleStartSession(selectedAppDefinition);
} else {
console.log('Decided not to auto-start the session');
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 274e76c

Please sign in to comment.