fix: undo test to de-active redirect to home page ...

This commit is contained in:
qfdk 2022-10-15 22:51:26 +02:00
parent 76b8473601
commit bc0630ce85
1 changed files with 11 additions and 11 deletions

View File

@ -34,17 +34,17 @@ export const SiteLayout: React.FC<SiteLayoutProps> = ({ children, title }) => {
siteId: domainOrSubdomain,
})
// useEffect(() => {
// if (site.data) {
// if (
// window.location.host.split(".").slice(-2).join(".") !== OUR_DOMAIN &&
// window.location.host !== site.data?.custom_domain &&
// IS_PROD
// ) {
// window.location.href = SITE_URL
// }
// }
// }, [site.isSuccess, site.data])
useEffect(() => {
if (site.data) {
if (
window.location.host.split(".").slice(-2).join(".") !== OUR_DOMAIN &&
window.location.host !== site.data?.custom_domain &&
IS_PROD
) {
window.location.href = SITE_URL
}
}
}, [site.isSuccess, site.data])
return (
<>