Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

explore-context.ts 805B

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