(params: Record<string, any>)
| 90 | fetchCodeData() |
| 91 | }, []) |
| 92 | const fetchData = async (params: Record<string, any>) => { |
| 93 | try { |
| 94 | const res: any = await getModelsList(params) |
| 95 | const data = res.data.map((item: RecordType) => { |
| 96 | return { |
| 97 | ...item, |
| 98 | key: item.model_id, |
| 99 | } |
| 100 | }) |
| 101 | setHasMore(res.has_more) |
| 102 | setModelList(data) |
| 103 | } catch (e) { |
| 104 | console.log(e) |
| 105 | } |
| 106 | } |
| 107 | useEffect(() => { |
| 108 | dispatch(setLoading(true)); |
| 109 | if (modelLists.data.length > 0) { |
no test coverage detected