explore-context.ts 604 B

1234567891011121314151617181920
  1. import { createContext } from 'use-context-selector'
  2. import type { InstalledApp } from '@/models/explore'
  3. type IExplore = {
  4. controlUpdateInstalledApps: number
  5. setControlUpdateInstalledApps: (controlUpdateInstalledApps: number) => void
  6. hasEditPermission: boolean
  7. installedApps: InstalledApp[]
  8. setInstalledApps: (installedApps: InstalledApp[]) => void
  9. }
  10. const ExploreContext = createContext<IExplore>({
  11. controlUpdateInstalledApps: 0,
  12. setControlUpdateInstalledApps: () => { },
  13. hasEditPermission: false,
  14. installedApps: [],
  15. setInstalledApps: () => { },
  16. })
  17. export default ExploreContext