pridanie pocty online/available hracov
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user