From 83fb07f41977c4d23c596f8704d230296ba8039d Mon Sep 17 00:00:00 2001 From: jaredvu Date: Fri, 8 Nov 2024 11:53:19 -0800 Subject: [PATCH] remove clearTimeout --- src/hooks/useCurrentMarketId.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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]);