This commit is contained in:
Gavin McDonald
2025-06-26 14:39:04 -04:00
parent 12ae8dd6d8
commit 2c2e93649c
3 changed files with 16 additions and 18 deletions

View File

@@ -33,10 +33,11 @@ export interface AppContext {
}
export function AppProvider({ children }: { children: ReactNode }) {
const [gameData, setGameData] = useState<GameUpdate>(gameStart);
const [gameID, setGameID] = useState('');
const [noGame, setNoGame] = useState(false);
const [selectCardIndex, setSelectCardIndex] = useState(-1);
const [gameData, setGameData] = useState<GameUpdate>(gameStart);
const [tilts, setTilts] = useState<Tilt[]>([]);
const { flipCard, redraw, select, handleSettings } = useSocket({
gameID,
@@ -44,8 +45,6 @@ export function AppProvider({ children }: { children: ReactNode }) {
setNoGame,
});
const [tilts, setTilts] = useState<Tilt[]>([]);
const handleSelect = (cardID: string) => {
setSelectCardIndex(-1);