18 lines
343 B
TypeScript
18 lines
343 B
TypeScript
import { create } from "zustand";
|
|
import { type IEventInfo } from '../types';
|
|
|
|
interface StoreType {
|
|
eventInfo?: IEventInfo;
|
|
setEventInfo: (info?: IEventInfo) => void;
|
|
}
|
|
|
|
|
|
const useGameStore = create<StoreType>((set) => {
|
|
return {
|
|
setEventInfo: (info) => {
|
|
set({ eventInfo: info });
|
|
},
|
|
}
|
|
});
|
|
|
|
export default useGameStore; |