You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
674 B
24 lines
674 B
import React from "react";
|
|
import create from "zustand";
|
|
import { MANAGER_USER } from "../../App";
|
|
import tabSkinApp from "../constSkin";
|
|
import { Game } from "../core/game";
|
|
import { Skin } from "../core/Skin";
|
|
import { User } from "../core/User/user";
|
|
|
|
|
|
// Define store types
|
|
interface GameState {
|
|
tabGame: Game[] | undefined;
|
|
setTabGame: (tabGame: Game[]) => void;
|
|
resetTabGame: () => void;
|
|
}
|
|
|
|
// Define store data and methods
|
|
export const useGameStore = create<GameState>()((set, get) => ({
|
|
tabGame: undefined,
|
|
setTabGame: (tabGame) => set((state) => ({ tabGame: tabGame })),
|
|
resetTabGame: () => set((state) => ({ tabGame: undefined })),
|
|
}));
|
|
|