()
| 24 | useEffect(() => { |
| 25 | let cancelled = false; |
| 26 | const load = async () => { |
| 27 | const payload = await fetchTraces(100); |
| 28 | if (cancelled) return; |
| 29 | if (!payload) { |
| 30 | setError("[ERROR: TRACE ENDPOINT UNREACHABLE]"); |
| 31 | setTraces([]); |
| 32 | return; |
| 33 | } |
| 34 | setError(null); |
| 35 | setTraces(payload.items); |
| 36 | }; |
| 37 | load(); |
| 38 | return () => { |
| 39 | cancelled = true; |
no test coverage detected