feat: can show app detail modal

This commit is contained in:
Joel
2025-10-23 14:17:43 +08:00
parent ab56b4a818
commit b018f2b0a0
6 changed files with 115 additions and 7 deletions

View File

@ -2,6 +2,10 @@ import { createContext } from 'use-context-selector'
import type { InstalledApp } from '@/models/explore'
import { noop } from 'lodash-es'
export type CurrentTryAppParams = {
appId: string
}
type IExplore = {
controlUpdateInstalledApps: number
setControlUpdateInstalledApps: (controlUpdateInstalledApps: number) => void
@ -10,6 +14,9 @@ type IExplore = {
setInstalledApps: (installedApps: InstalledApp[]) => void
isFetchingInstalledApps: boolean
setIsFetchingInstalledApps: (isFetchingInstalledApps: boolean) => void
currentApp?: CurrentTryAppParams
isShowTryAppPanel: boolean
setShowTryAppPanel: (showTryAppPanel: boolean, params?: CurrentTryAppParams) => void
}
const ExploreContext = createContext<IExplore>({
@ -20,6 +27,9 @@ const ExploreContext = createContext<IExplore>({
setInstalledApps: noop,
isFetchingInstalledApps: false,
setIsFetchingInstalledApps: noop,
isShowTryAppPanel: false,
setShowTryAppPanel: noop,
currentApp: undefined,
})
export default ExploreContext