You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/app/components/workflow/plugin-dependency/store.ts

12 lines
331 B
TypeScript

import { create } from 'zustand'
import type { Dependency } from '@/app/components/plugins/types'
type Shape = {
dependencies: Dependency[]
setDependencies: (dependencies: Dependency[]) => void
}
export const useStore = create<Shape>(set => ({
dependencies: [],
setDependencies: dependencies => set({ dependencies }),
}))