feat: no domain redirection during vercel preview
This commit is contained in:
parent
cf43e98760
commit
a60be5d07c
|
|
@ -6,7 +6,7 @@ import { useAccountState } from "@crossbell/connect-kit"
|
|||
import { BlockchainInfo } from "~/components/common/BlockchainInfo"
|
||||
import { Style } from "~/components/common/Style"
|
||||
import { useUserRole } from "~/hooks/useUserRole"
|
||||
import { IS_PROD } from "~/lib/constants"
|
||||
import { IS_PROD, IS_VERCEL_PREVIEW } from "~/lib/constants"
|
||||
import { OUR_DOMAIN, SITE_URL } from "~/lib/env"
|
||||
import { getUserContentsUrl } from "~/lib/user-contents"
|
||||
import { cn } from "~/lib/utils"
|
||||
|
|
@ -66,7 +66,8 @@ export const SiteLayout: React.FC<SiteLayoutProps> = ({
|
|||
if (
|
||||
window.location.host.split(".").slice(-2).join(".") !== OUR_DOMAIN &&
|
||||
window.location.host !== site.data?.metadata?.content?.custom_domain &&
|
||||
IS_PROD
|
||||
IS_PROD &&
|
||||
!IS_VERCEL_PREVIEW
|
||||
) {
|
||||
window.location.href = SITE_URL
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue