mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 02:42:59 +00:00 
			
		
		
		
	 c67f626b66
			
		
	
	
		c67f626b66
		
			
		
	
	
	
	
		
			
			Co-authored-by: John Wang <takatost@gmail.com> Co-authored-by: Jyong <718720800@qq.com> Co-authored-by: 金伟强 <iamjoel007@gmail.com>
		
			
				
	
	
		
			21 lines
		
	
	
		
			604 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			604 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { createContext } from 'use-context-selector'
 | |
| import type { 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
 |