(collectionId: string, params: Record<string, any>)
| 277 | setFileId('') |
| 278 | } |
| 279 | const fetchData = async (collectionId: string, params: Record<string, any>) => { |
| 280 | setLoading(true); |
| 281 | try { |
| 282 | const res: any = await getRecordsList(collectionId, params) |
| 283 | const data = res.data.map((item: any) => { |
| 284 | return { |
| 285 | ...item, |
| 286 | key: item.record_id |
| 287 | } |
| 288 | }) |
| 289 | setRecordList(data); |
| 290 | setHasMore(res.has_more) |
| 291 | |
| 292 | } catch (error) { |
| 293 | console.log(error) |
| 294 | } |
| 295 | setLoading(false); |
| 296 | }; |
| 297 | const handleCreatePrompt = () => { |
| 298 | setContentValue('') |
| 299 | setTitle('') |
no test coverage detected