mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-06 05:08:14 +08:00
21 lines
599 B
TypeScript
21 lines
599 B
TypeScript
import { createContext } from 'use-context-selector'
|
|
import { InstalledApp } from '@/models/explore'
|
|
|
|
type IExplore = {
|
|
controlUpdateInstalledApps: number
|
|
setControlUpdateInstalledApps: (controlUpdateInstalledApps: number) => void
|
|
hasEditPermission: boolean
|
|
installedApps: InstalledApp[]
|
|
setInstalledApps: (installedApps: InstalledApp[]) => void
|
|
}
|
|
|
|
const ExploreContext = createContext<IExplore>({
|
|
controlUpdateInstalledApps: 0,
|
|
setControlUpdateInstalledApps: () => { },
|
|
hasEditPermission: false,
|
|
installedApps: [],
|
|
setInstalledApps: () => { },
|
|
})
|
|
|
|
export default ExploreContext
|