pridanie pocty online/available hracov

This commit is contained in:
tim
2026-07-27 20:09:24 +02:00
parent 04185a0d97
commit 18ae869ee8
7 changed files with 153 additions and 28 deletions
+8
View File
@@ -12,6 +12,8 @@ import type {
interface GameStore {
games: GameInfo[];
onlineCount: number;
availableCount: number;
account: Account | null;
registration: Registration | null;
history: HistoryGame[];
@@ -22,6 +24,8 @@ interface GameStore {
error: string | null;
setGames: (games: GameInfo[]) => void;
setOnlineCount: (count: number) => void;
setAvailableCount: (count: number) => void;
setAccount: (account: Account | null) => void;
setRegistration: (registration: Registration | null) => void;
setHistory: (history: HistoryGame[]) => void;
@@ -38,6 +42,8 @@ interface GameStore {
export const useGameStore = create<GameStore>((set) => ({
games: [],
onlineCount: 0,
availableCount: 0,
account: null,
registration: null,
history: [],
@@ -48,6 +54,8 @@ export const useGameStore = create<GameStore>((set) => ({
error: null,
setGames: (games) => set({ games }),
setOnlineCount: (onlineCount) => set({ onlineCount }),
setAvailableCount: (availableCount) => set({ availableCount }),
setAccount: (account) => set({ account }),
setRegistration: (registration) => set({ registration }),
setHistory: (history) => set({ history }),