tune down diff wait time to 3 seconds (#808)

This commit is contained in:
Gabriel Gordon-Hall
2025-09-23 09:39:59 +01:00
committed by GitHub
parent 98fc1a7269
commit 61f9f9ff14

View File

@@ -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]);