()
| 16 | let mounted = true; |
| 17 | setLoading(true); |
| 18 | const fetchInbox = () => |
| 19 | fetch() |
| 20 | .then((data: any) => { |
| 21 | if (mounted) { |
| 22 | success(data); |
| 23 | } |
| 24 | }) |
| 25 | .catch(() => { |
| 26 | if (mounted) { |
| 27 | error(); |
| 28 | } |
| 29 | }) |
| 30 | .finally(() => { |
| 31 | if (mounted) { |
| 32 | setLoading(false); |
| 33 | } |
| 34 | }); |
| 35 | fetchInbox(); |
| 36 | |
| 37 | const intervalId = setInterval(() => { |
no test coverage detected