dify/web/app/components/plugins/plugin-detail-panel/store.ts

13 lines
311 B
TypeScript

import { create } from 'zustand'
import type { PluginDetail } from '../types'
type Shape = {
detail: PluginDetail | undefined
setDetail: (detail: PluginDetail) => void
}
export const usePluginStore = create<Shape>(set => ({
detail: undefined,
setDetail: (detail: PluginDetail) => set({ detail }),
}))