From bc0630ce85db2ee5c873e971ecf9b45bb3ee3ae2 Mon Sep 17 00:00:00 2001 From: qfdk Date: Sat, 15 Oct 2022 22:51:26 +0200 Subject: [PATCH] fix: undo test to de-active redirect to home page ... --- src/components/site/SiteLayout.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/site/SiteLayout.tsx b/src/components/site/SiteLayout.tsx index ea8c4d59..55424fa1 100644 --- a/src/components/site/SiteLayout.tsx +++ b/src/components/site/SiteLayout.tsx @@ -34,17 +34,17 @@ export const SiteLayout: React.FC = ({ 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 ( <>