Fixes here

This commit is contained in:
2026-02-09 20:22:11 -07:00
parent c91303d194
commit 16dd3fd613

View File

@@ -1,6 +1,12 @@
'use client' 'use client'
import { createContext, useContext, ReactNode } from 'react' import {
createContext,
useContext,
ReactNode,
Dispatch,
SetStateAction
} from 'react'
import { DownloadProgress } from './types/DownloadProgress' import { DownloadProgress } from './types/DownloadProgress'
import { VersionsConfig } from './types/VersionsConfig' import { VersionsConfig } from './types/VersionsConfig'
import { NormalConfig } from './types/NormalConfig' import { NormalConfig } from './types/NormalConfig'
@@ -11,25 +17,25 @@ import { Game } from './types/Game'
type GlobalCtxType = { type GlobalCtxType = {
serverVersionList: ServerVersionsResponse | null serverVersionList: ServerVersionsResponse | null
selectedVersionList: string[] selectedVersionList: string[]
setSelectedVersionList: (v: string[]) => void setSelectedVersionList: (value: SetStateAction<string[]>) => void
downloadProgress: DownloadProgress[] downloadProgress: DownloadProgress[]
setDownloadProgress: (v: DownloadProgress[]) => void setDownloadProgress: Dispatch<SetStateAction<DownloadProgress[]>>
showPopup: boolean showPopup: boolean
setShowPopup: (v: boolean) => void setShowPopup: Dispatch<SetStateAction<boolean>>
popupMode: number | null popupMode: number | null
setPopupMode: (v: number | null) => void setPopupMode: Dispatch<SetStateAction<number | null>>
fadeOut: boolean fadeOut: boolean
setFadeOut: (v: boolean) => void setFadeOut: Dispatch<SetStateAction<boolean>>
downloadedVersionsConfig: VersionsConfig | null downloadedVersionsConfig: VersionsConfig | null
setDownloadedVersionsConfig: (v: VersionsConfig | null) => void setDownloadedVersionsConfig: Dispatch<SetStateAction<VersionsConfig | null>>
normalConfig: NormalConfig | null normalConfig: NormalConfig | null
setNormalConfig: (v: NormalConfig | null) => void setNormalConfig: Dispatch<SetStateAction<NormalConfig | null>>
managingVersion: string | null managingVersion: string | null
setManagingVersion: (v: string | null) => void setManagingVersion: Dispatch<SetStateAction<string | null>>
setSelectedGame: (v: number | null) => void setSelectedGame: Dispatch<SetStateAction<number | null>>
getVersionInfo: (id: string | undefined) => GameVersion | undefined getVersionInfo: (id: string | undefined) => GameVersion | undefined
getGameInfo: (id: number | undefined) => Game | undefined getGameInfo: (game: number | undefined) => Game | undefined
getListOfGames: () => Game[] getListOfGames(): Game[]
getVersionsAmountData: (gameId: number) => { getVersionsAmountData: (gameId: number) => {
installed: number installed: number
total: number total: number