()
| 41 | let disposed = false |
| 42 | |
| 43 | async function refresh() { |
| 44 | try { |
| 45 | const { entries } = await api.inbox.history({ limit: 100 }) |
| 46 | if (disposed) return |
| 47 | apply((prev) => ({ ...prev, entries, loading: false })) |
| 48 | } catch { |
| 49 | if (disposed) return |
| 50 | apply((prev) => ({ ...prev, loading: false })) |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | applyState = apply |
| 55 | triggerRefresh = refresh |
no test coverage detected