@@ -73,6 +73,7 @@ export function App({
|
|||||||
window.addEventListener("online", function (e) {
|
window.addEventListener("online", function (e) {
|
||||||
setOnline(true);
|
setOnline(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentUser.authorized && bodyshop) {
|
if (currentUser.authorized && bodyshop) {
|
||||||
client.setAttribute("imexshopid", bodyshop.imexshopid);
|
client.setAttribute("imexshopid", bodyshop.imexshopid);
|
||||||
|
|||||||
@@ -26,14 +26,12 @@ export const handleBeta = () => {
|
|||||||
if (isBeta && !currentHostName.startsWith('beta')) {
|
if (isBeta && !currentHostName.startsWith('beta')) {
|
||||||
const href= `${window.location.protocol}//beta.${currentHostName}${window.location.pathname}${window.location.search}${window.location.hash}`;
|
const href= `${window.location.protocol}//beta.${currentHostName}${window.location.pathname}${window.location.search}${window.location.hash}`;
|
||||||
window.location.replace(href);
|
window.location.replace(href);
|
||||||
window.location.reload(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Beta is not enabled, but the current host name does start with beta.
|
// Beta is not enabled, but the current host name does start with beta.
|
||||||
else if (!isBeta && currentHostName.startsWith('beta')) {
|
else if (!isBeta && currentHostName.startsWith('beta')) {
|
||||||
const href = `${window.location.protocol}//${currentHostName.replace('beta.', '')}${window.location.pathname}${window.location.search}${window.location.hash}`;
|
const href = `${window.location.protocol}//${currentHostName.replace('beta.', '')}${window.location.pathname}${window.location.search}${window.location.hash}`;
|
||||||
window.location.replace(href);
|
window.location.replace(href);
|
||||||
window.location.reload(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default handleBeta;
|
export default handleBeta;
|
||||||
|
|||||||
Reference in New Issue
Block a user