Skip to content

Commit

Permalink
Add no-start url param
Browse files Browse the repository at this point in the history
  • Loading branch information
iyannsch committed Aug 29, 2024
1 parent 6375597 commit bc0a99f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions node/landing-page/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,24 @@ function App(): JSX.Element {
console.error('Authentication Failed');
});
}
}

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('-----------------------------------');

const urlParams = new URLSearchParams(window.location.search);

// Try to start the app if the app definition was changed via URL parameter
if (selectedAppDefinition && selectedAppDefinition !== initialAppDefinition) {
if (!urlParams.has('no-start') && selectedAppDefinition) {
console.log('Starting session for ' + selectedAppDefinition);
//handleStartSession(selectedAppDefinition);
} else {
console.log('Decided not to auto-start the session');
handleStartSession(selectedAppDefinition);
}
}

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 */
Expand Down

0 comments on commit bc0a99f

Please sign in to comment.