diff --git a/package.json b/package.json index d7953d1e..8373f76b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yearn-finance/web-lib", - "version": "3.0.158", + "version": "3.0.159", "main": "./dist/index.js", "types": "./dist/index.d.js", "files": [ diff --git a/src/components/LogoPopover.tsx b/src/components/LogoPopover.tsx index d73316a1..a4d39990 100644 --- a/src/components/LogoPopover.tsx +++ b/src/components/LogoPopover.tsx @@ -4,6 +4,7 @@ import {motion} from 'framer-motion'; import {cl} from '@builtbymom/web3/utils'; import {Popover, Transition} from '@headlessui/react'; +import {useIsMounted} from '../hooks/useIsMounted'; import {V3Logo} from '../icons/V3Logo'; import {APPS} from './YearnApps'; @@ -63,14 +64,15 @@ function Logo(): ReactElement { export function LogoPopover(): ReactElement { const [isShowing, set_isShowing] = useState(false); + const isMounted = useIsMounted(); const currentHost = useMemo(() => { if (typeof window === 'undefined') { - return 'yearn.fi'; + return ''; } return window.location.host; // eslint-disable-next-line react-hooks/exhaustive-deps - }, [typeof window]); + }, [typeof window, isMounted]); const currentApp = useMemo(() => { return Object.values(APPS).find(({host}): boolean => {