(params: Record<string, any>)
| 972 | |
| 973 | } |
| 974 | const fetchDataRetrievalData = async (params: Record<string, any>) => { |
| 975 | try { |
| 976 | const res: any = await getRetrievalList(params) |
| 977 | const data = res.data.map((item: any) => { |
| 978 | return { |
| 979 | ...item, |
| 980 | capacity1: item.num_chunks + '/' + item.capacity, |
| 981 | key: item.collection_id |
| 982 | } |
| 983 | }) |
| 984 | setRetrievalList(data); |
| 985 | setHasMore(res.has_more) |
| 986 | setUpdateRetrievalPrevButton(true) |
| 987 | |
| 988 | } catch (e) { |
| 989 | const apiResponse = e as ApiErrorResponse |
| 990 | const message = apiResponse.response.data.error.message |
| 991 | toast.error(message) |
| 992 | console.log(e) |
| 993 | } |
| 994 | } |
| 995 | const handleChangeName = (value: string) => { |
| 996 | setDrawerName(value) |
| 997 | } |
no test coverage detected