Merged in feature/IO-1828-Beta-Updates-To-Test (pull request #1190)

- update handleBeta
This commit is contained in:
Dave Richer
2024-01-18 21:16:22 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -58,9 +58,8 @@ export function App({
if (!navigator.onLine) {
setOnline(false);
}
handleBeta();
checkUserSession();
handleBeta();
}, [checkUserSession, setOnline]);
//const b = Grid.useBreakpoint();

View File

@@ -26,12 +26,14 @@ export const handleBeta = () => {
if (isBeta && !currentHostName.startsWith('beta')) {
const href= `${window.location.protocol}//beta.${currentHostName}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(href);
window.location.reload(true);
}
// Beta is not enabled, but the current host name does start with beta.
else if (!isBeta && currentHostName.startsWith('beta')) {
const href = `${window.location.protocol}//${currentHostName.replace('beta.', '')}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(href);
window.location.reload(true)
}
}
export default handleBeta;