fix: tool providers

pull/12372/head
StyleZhang 1 year ago
parent 2067092f52
commit 022eda9e8b

@ -36,7 +36,7 @@ const ProviderList = () => {
const handleKeywordsChange = (value: string) => { const handleKeywordsChange = (value: string) => {
setKeywords(value) setKeywords(value)
} }
const { data: collectionList, refetch } = useAllToolProviders() const { data: collectionList = [], refetch } = useAllToolProviders()
const filteredCollectionList = useMemo(() => { const filteredCollectionList = useMemo(() => {
return collectionList.filter((collection) => { return collectionList.filter((collection) => {
if (collection.type !== activeTab) if (collection.type !== activeTab)

@ -18,7 +18,6 @@ export const useAllToolProviders = () => {
return useQuery({ return useQuery({
queryKey: useAllToolProvidersKey, queryKey: useAllToolProvidersKey,
queryFn: () => get<Collection[]>('/workspaces/current/tool-providers'), queryFn: () => get<Collection[]>('/workspaces/current/tool-providers'),
initialData: [],
}) })
} }

Loading…
Cancel
Save