mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 19:06:51 +08:00
Feat/use searchparams as state (#2554)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import EditCustomToolModal from './edit-custom-collection-modal'
|
||||
import NoCustomTool from './info/no-custom-tool'
|
||||
import NoSearchRes from './info/no-search-res'
|
||||
import NoCustomToolPlaceholder from './no-custom-tool-placeholder'
|
||||
import { useTabSearchParams } from '@/hooks/use-tab-searchparams'
|
||||
import TabSlider from '@/app/components/base/tab-slider'
|
||||
import { createCustomCollection, fetchCollectionList as doFetchCollectionList, fetchBuiltInToolList, fetchCustomToolList } from '@/service/tools'
|
||||
import type { AgentTool } from '@/types/app'
|
||||
@@ -68,7 +69,9 @@ const Tools: FC<Props> = ({
|
||||
})()
|
||||
|
||||
const [query, setQuery] = useState('')
|
||||
const [collectionType, setCollectionType] = useState<CollectionType>(collectionTypeOptions[0].value)
|
||||
const [collectionType, setCollectionType] = useTabSearchParams({
|
||||
defaultTab: collectionTypeOptions[0].value,
|
||||
})
|
||||
|
||||
const showCollectionList = (() => {
|
||||
let typeFilteredList: Collection[] = []
|
||||
|
||||
Reference in New Issue
Block a user