From 9eedcd20b0ef830b64fcb3cb10683b66d5dd51c1 Mon Sep 17 00:00:00 2001 From: Alfetopito Date: Fri, 24 Jan 2025 11:03:09 +0000 Subject: [PATCH] fix: don't use hook conditionally --- .../src/modules/trade/hooks/useLimitOrdersPromoBanner.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/cowswap-frontend/src/modules/trade/hooks/useLimitOrdersPromoBanner.ts b/apps/cowswap-frontend/src/modules/trade/hooks/useLimitOrdersPromoBanner.ts index 0065feb6f0..4b0615e280 100644 --- a/apps/cowswap-frontend/src/modules/trade/hooks/useLimitOrdersPromoBanner.ts +++ b/apps/cowswap-frontend/src/modules/trade/hooks/useLimitOrdersPromoBanner.ts @@ -1,11 +1,7 @@ - import { useAtom } from 'jotai' import { atomWithStorage } from 'jotai/utils' import { useCallback } from 'react' - - - import { useFeatureFlags } from '@cowprotocol/common-hooks' import { isInjectedWidget } from '@cowprotocol/common-utils' @@ -20,7 +16,7 @@ const STORAGE_KEY = 'limitOrdersPromoBanner:v0' const promoBannerAtom = atomWithStorage(STORAGE_KEY, true) export function useLimitOrdersPromoBanner() { - const isLimitOrdersTab = !!(useMatch(Routes.LIMIT_ORDER) || useMatch(Routes.LONG_LIMIT_ORDER)) + const isLimitOrdersTab = !!useMatch(Routes.LIMIT_ORDER) const { standaloneMode } = useInjectedWidgetParams() const [isVisible, setIsVisible] = useAtom(promoBannerAtom) const { isLimitOrdersUpgradeBannerEnabled } = useFeatureFlags()