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]);
|
||||
|
||||
// If no diffs arrive within 7 seconds, stop showing the spinner
|
||||
// If no diffs arrive within 3 seconds, stop showing the spinner
|
||||
useEffect(() => {
|
||||
if (!loading) return;
|
||||
const timer = setTimeout(() => {
|
||||
if (diffs.length === 0) {
|
||||
setLoading(false);
|
||||
}
|
||||
}, 7000);
|
||||
}, 3000);
|
||||
return () => clearTimeout(timer);
|
||||
}, [loading, diffs.length]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user