Skip to content

Commit

Permalink
fix: don't use hook conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Jan 24, 2025
1 parent ae5daa5 commit 9eedcd2
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -20,7 +16,7 @@ const STORAGE_KEY = 'limitOrdersPromoBanner:v0'
const promoBannerAtom = atomWithStorage<boolean>(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()
Expand Down

0 comments on commit 9eedcd2

Please sign in to comment.