diff --git a/src/config/constants.ts b/src/config/constants.ts index cfda92f56c..0d663d230c 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -98,7 +98,7 @@ export const DISCORD_URL = 'https://chat.safe.global' export const TWITTER_URL = 'https://twitter.com/safe' // Legal -export const OFFICIAL_HOSTS = /(app\.safe\.global|.+\.5afe\.dev|localhost:3000)\// +export const OFFICIAL_HOSTS = /app\.safe\.global|.+\.5afe\.dev|localhost:3000/ // Risk mitigation (Blockaid) export const BLOCKAID_API = 'https://client.blockaid.io' diff --git a/src/hooks/useIsOfficialHost.ts b/src/hooks/useIsOfficialHost.ts index 5ad2617111..a16e432a7e 100644 --- a/src/hooks/useIsOfficialHost.ts +++ b/src/hooks/useIsOfficialHost.ts @@ -1,6 +1,6 @@ -import { useMemo } from "react" -import { OFFICIAL_HOSTS } from "@/config/constants" +import { useMemo } from 'react' +import { OFFICIAL_HOSTS } from '@/config/constants' export const useIsOfficialHost = (): boolean => { - return useMemo(() => typeof window === 'undefined' ? true : OFFICIAL_HOSTS.test(window.location.host), []) + return useMemo(() => (typeof window === 'undefined' ? true : OFFICIAL_HOSTS.test(window.location.host)), []) }