()
| 37 | useEffect(() => { |
| 38 | mounted.current = true |
| 39 | const load = async () => { |
| 40 | try { |
| 41 | const next = await api.issues.get() |
| 42 | cached = next |
| 43 | if (mounted.current) { |
| 44 | setData(next) |
| 45 | setError(null) |
| 46 | } |
| 47 | } catch (e) { |
| 48 | if (mounted.current) setError(e instanceof Error ? e.message : String(e)) |
| 49 | } |
| 50 | } |
| 51 | void load() |
| 52 | const id = setInterval(() => void load(), POLL_MS) |
| 53 | return () => { |
no test coverage detected