mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
chore: use query
This commit is contained in:
parent
c7f8a0fc7b
commit
2dd9c64d34
|
@ -51,7 +51,7 @@ const ToolPicker: FC<Props> = ({
|
|||
|
||||
const { data: buildInTools } = useAllBuiltInTools()
|
||||
const { data: customTools } = useAllCustomTools()
|
||||
const { invalidate: invalidateCustomTools } = useInvalidateAllCustomTools()
|
||||
const invalidateCustomTools = useInvalidateAllCustomTools()
|
||||
const { data: workflowTools } = useAllWorkflowTools()
|
||||
|
||||
const handleAddedCustomTool = invalidateCustomTools
|
||||
|
|
|
@ -30,13 +30,11 @@ export const useAllCustomTools = () => {
|
|||
|
||||
export const useInvalidateAllCustomTools = () => {
|
||||
const queryClient = useQueryClient()
|
||||
return {
|
||||
invalidate: () => {
|
||||
return () => {
|
||||
queryClient.invalidateQueries(
|
||||
{
|
||||
queryKey: useAllCustomToolsKey,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user