From bf3de54797a23562e88f77245320f05d2ccd9851 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 20 Jul 2025 11:43:38 -0500 Subject: [PATCH] Restore link primitive cleanup --- src/components/primitives/LinkWithStatusChild.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/primitives/LinkWithStatusChild.tsx b/src/components/primitives/LinkWithStatusChild.tsx index 22c5422d..b11ecdb5 100644 --- a/src/components/primitives/LinkWithStatusChild.tsx +++ b/src/components/primitives/LinkWithStatusChild.tsx @@ -40,11 +40,14 @@ export default function LinkWithStatusChild({ isLoadingStartTime.current = undefined; }, Math.max(0, flickerThreshold - loadingDuration)); } + }, [pending, setIsLoading, flickerThreshold]); + + useEffect(() => { return () => { clearTimeout(startLoadingTimeout.current); clearTimeout(stopLoadingTimeout.current); }; - }, [pending, setIsLoading, flickerThreshold]); + }, []); useEffect(() => { if (!pending && startLoadingTimeout.current) {