Smh
This commit is contained in:
18
đ
18
đ
@@ -1,18 +0,0 @@
|
||||
import { GAMES, MODES } from "@/data/hypixel/hypixel"
|
||||
|
||||
export function getGame(val: string) {
|
||||
const game = GAMES.find(g => g.id === val)
|
||||
return game || null
|
||||
}
|
||||
|
||||
export function getGameMode(gameType?: string, mode?: string) {
|
||||
if (!gameType || !mode) return null
|
||||
const game = getGame(gameType)
|
||||
if (!game) return null
|
||||
|
||||
const gameModes = MODES[gameType as keyof typeof MODES]
|
||||
if (!gameModes) return null
|
||||
|
||||
const modeValue = gameModes[mode as keyof typeof gameModes]
|
||||
return modeValue || null
|
||||
}
|
||||
Reference in New Issue
Block a user