From 324554a1a755bd04c266e5366f1c3a75d59617c0 Mon Sep 17 00:00:00 2001 From: Majorfi Date: Fri, 9 Feb 2024 16:18:28 +0100 Subject: [PATCH] build: bump --- package.json | 2 +- src/components/LogoPopover.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 => {