chore: tool selelct use the same tools data

pull/12560/head
Joel 1 year ago
parent 0383fce821
commit 55ad1fe1f0

@ -1,6 +1,6 @@
import type { FC } from 'react' import type { FC } from 'react'
import { memo } from 'react' import { memo } from 'react'
import { useStore } from '../store' import { useAllBuiltInTools, useAllCustomTools, useAllWorkflowTools } from '@/service/use-tools'
import type { BlockEnum } from '../types' import type { BlockEnum } from '../types'
import { useTabs } from './hooks' import { useTabs } from './hooks'
import type { ToolDefaultValue } from './types' import type { ToolDefaultValue } from './types'
@ -28,9 +28,9 @@ const Tabs: FC<TabsProps> = ({
noBlocks, noBlocks,
}) => { }) => {
const tabs = useTabs() const tabs = useTabs()
const buildInTools = useStore(s => s.buildInTools) const { data: buildInTools } = useAllBuiltInTools()
const customTools = useStore(s => s.customTools) const { data: customTools } = useAllCustomTools()
const workflowTools = useStore(s => s.workflowTools) const { data: workflowTools } = useAllWorkflowTools()
return ( return (
<div onClick={e => e.stopPropagation()}> <div onClick={e => e.stopPropagation()}>

Loading…
Cancel
Save