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