Restore link primitive cleanup

This commit is contained in:
Sam Becker 2025-07-20 11:43:38 -05:00
parent a5efb8a964
commit bf3de54797

View File

@ -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) {