tune down diff wait time to 3 seconds (#808)
This commit is contained in:
committed by
GitHub
parent
98fc1a7269
commit
61f9f9ff14
@@ -35,14 +35,14 @@ function DiffTab({ selectedAttempt }: DiffTabProps) {
|
|||||||
}
|
}
|
||||||
}, [diffs, loading]);
|
}, [diffs, loading]);
|
||||||
|
|
||||||
// If no diffs arrive within 7 seconds, stop showing the spinner
|
// If no diffs arrive within 3 seconds, stop showing the spinner
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!loading) return;
|
if (!loading) return;
|
||||||
const timer = setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
if (diffs.length === 0) {
|
if (diffs.length === 0) {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, 7000);
|
}, 3000);
|
||||||
return () => clearTimeout(timer);
|
return () => clearTimeout(timer);
|
||||||
}, [loading, diffs.length]);
|
}, [loading, diffs.length]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user