diff --git a/src/hooks/useCurrentMarketId.ts b/src/hooks/useCurrentMarketId.ts index 8fd3f6992..a27916433 100644 --- a/src/hooks/useCurrentMarketId.ts +++ b/src/hooks/useCurrentMarketId.ts @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useRef } from 'react'; +import { useEffect, useMemo } from 'react'; import { shallowEqual } from 'react-redux'; import { useMatch, useNavigate } from 'react-router-dom'; @@ -69,8 +69,6 @@ export const useCurrentMarketId = () => { return marketId ?? lastViewedMarket; }, [hasMarketIds, marketId]); - const launchedMarketTimeout = useRef(null); - const isViewingUnlaunchedMarket = useMemo(() => { if (!hasMarketIds || !hasLoadedLaunchableMarkets || !testFlags.pml) return false; @@ -90,14 +88,6 @@ export const useCurrentMarketId = () => { marketId, ]); - useEffect(() => { - return () => { - if (launchedMarketTimeout.current) { - clearTimeout(launchedMarketTimeout.current); - } - }; - }, []); - const isViewingPredictionMarket = useMemo(() => { return predictionMarkets.some((market) => market.id === marketId); }, [predictionMarkets.length, marketId]);