This commit is contained in:
2025-11-01 21:10:31 -07:00
parent c90cf0ed55
commit 3c05196dda
11 changed files with 155 additions and 30 deletions

View File

@@ -7,7 +7,6 @@ import { NormalConfig } from './types/NormalConfig'
import { ServerVersionsResponse } from './types/ServerVersionsResponse'
import { GameVersion } from './types/GameVersion'
import { Game } from './types/Game'
import { ReadonlyURLSearchParams } from 'next/navigation'
type GlobalCtxType = {
serverVersionList: ServerVersionsResponse | null
@@ -31,6 +30,10 @@ type GlobalCtxType = {
getVersionInfo: (id: string | undefined) => GameVersion | undefined
getVersionGame: (id: number | undefined) => Game | undefined
getListOfGames: () => Game[]
getVersionsAmountData: (gameId: number) => {
installed: number
total: number
} | null
}
const GlobalCtx = createContext<GlobalCtxType | null>(null)