diff --git a/config/routes.ts b/config/routes.ts index 98c98ac1..36f4e98b 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -74,17 +74,6 @@ export default [ defaultIcon: 'icon-audio1', component: './playground/speech' } - // { - // name: 'video', - // title: 'Video', - // path: '/playground/video', - // key: 'video', - // icon: 'icon-video-outline', - // hideInMenu: false, - // selectedIcon: 'icon-video-filled02', - // defaultIcon: 'icon-video-outline', - // component: './playground/video' - // } ] }, { diff --git a/src/hooks/use-table-fetch.ts b/src/hooks/use-table-fetch.ts index bf4b43f4..acd3d52d 100644 --- a/src/hooks/use-table-fetch.ts +++ b/src/hooks/use-table-fetch.ts @@ -137,7 +137,7 @@ export default function useTableFetch( axiosTokenRef.current?.cancel?.(); axiosTokenRef.current = createAxiosToken(); const res = await fetchAPI(params, { - token: axiosTokenRef.current + token: axiosTokenRef.current.token }); shouldUpdateRef.current = false; loadendRef.current = true; @@ -160,7 +160,7 @@ export default function useTableFetch( query: { ...newParams } }; const newRes = await fetchAPI(newParams, { - token: axiosTokenRef.current + token: axiosTokenRef.current.token }); setDataSource({ diff --git a/src/pages/llmodels/catalog.tsx b/src/pages/llmodels/catalog.tsx index 8ea34bce..580856fb 100644 --- a/src/pages/llmodels/catalog.tsx +++ b/src/pages/llmodels/catalog.tsx @@ -113,11 +113,13 @@ const Catalog: React.FC = () => { const getCatalogSource = async () => { try { const id = dataSource.dataList?.[0]?.id; - const res: any = await queryCatalogItemSpec({ - id, - cluster_id: null - }); - sourceRef.current = res?.items?.[0]?.source; + if (id) { + const res: any = await queryCatalogItemSpec({ + id, + cluster_id: null + }); + sourceRef.current = res?.items?.[0]?.source; + } } catch (error) {} }; getCatalogSource();