Add temporary logging to LinkWithStatus
This commit is contained in:
parent
e1ba3d84b4
commit
2425287544
@ -31,13 +31,17 @@ export default function LinkWithStatus({
|
||||
|
||||
const didStartLoading = useRef(false);
|
||||
useEffect(() => {
|
||||
console.log('link: 01', {isLoading, ref: didStartLoading.current});
|
||||
if (isLoading) {
|
||||
console.log('link: 02', {isLoading, ref: didStartLoading.current});
|
||||
didStartLoading.current = true;
|
||||
return () => {
|
||||
// Call onload when component unmounts while loading
|
||||
console.log('link: 03', {isLoading, ref: didStartLoading.current});
|
||||
if (isLoading) { onLoad?.(); }
|
||||
};
|
||||
} else if (didStartLoading.current) {
|
||||
console.log('link: 04', {isLoading, ref: didStartLoading.current});
|
||||
onLoad?.();
|
||||
didStartLoading.current = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user