dify
This commit is contained in:
24
dify/web/app/components/workflow/plugin-dependency/index.tsx
Normal file
24
dify/web/app/components/workflow/plugin-dependency/index.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { useCallback } from 'react'
|
||||
import { useStore } from './store'
|
||||
import InstallBundle from '@/app/components/plugins/install-plugin/install-bundle'
|
||||
|
||||
const PluginDependency = () => {
|
||||
const dependencies = useStore(s => s.dependencies)
|
||||
|
||||
const handleCancelInstallBundle = useCallback(() => {
|
||||
const { setDependencies } = useStore.getState()
|
||||
setDependencies([])
|
||||
}, [])
|
||||
|
||||
if (!dependencies.length)
|
||||
return null
|
||||
|
||||
return (
|
||||
<InstallBundle
|
||||
fromDSLPayload={dependencies}
|
||||
onClose={handleCancelInstallBundle}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default PluginDependency
|
||||
Reference in New Issue
Block a user