Restore link primitive cleanup
This commit is contained in:
parent
a5efb8a964
commit
bf3de54797
@ -40,11 +40,14 @@ export default function LinkWithStatusChild({
|
|||||||
isLoadingStartTime.current = undefined;
|
isLoadingStartTime.current = undefined;
|
||||||
}, Math.max(0, flickerThreshold - loadingDuration));
|
}, Math.max(0, flickerThreshold - loadingDuration));
|
||||||
}
|
}
|
||||||
|
}, [pending, setIsLoading, flickerThreshold]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
clearTimeout(startLoadingTimeout.current);
|
clearTimeout(startLoadingTimeout.current);
|
||||||
clearTimeout(stopLoadingTimeout.current);
|
clearTimeout(stopLoadingTimeout.current);
|
||||||
};
|
};
|
||||||
}, [pending, setIsLoading, flickerThreshold]);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!pending && startLoadingTimeout.current) {
|
if (!pending && startLoadingTimeout.current) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user