MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / fetchData

Function fetchData

frontend/src/components/modelsPage/index.tsx:92–106  ·  view source on GitHub ↗
(params: Record<string, any>)

Source from the content-addressed store, hash-verified

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) {

Callers 1

handleChildEventFunction · 0.70

Calls 1

getModelsListFunction · 0.90

Tested by

no test coverage detected