fix: tool providers

This commit is contained in:
StyleZhang 2024-11-21 12:03:53 +08:00
parent 2067092f52
commit 022eda9e8b
2 changed files with 1 additions and 2 deletions

View File

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

View File

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