()
| 36 | }; |
| 37 | |
| 38 | async function onRefresh() { |
| 39 | try { |
| 40 | setLoading(true); |
| 41 | await getOptions(); |
| 42 | } catch (error) { |
| 43 | showError('刷新失败'); |
| 44 | } finally { |
| 45 | setLoading(false); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | useEffect(() => { |
| 50 | onRefresh(); |
no test coverage detected