Fix broken routing by unifying game state via Context API

This commit is contained in:
10x Developer 2026-05-08 21:35:14 +02:00
parent 6fc0820831
commit 82cae002f8
8 changed files with 53 additions and 20 deletions

View file

@ -1,9 +1,9 @@
import React from 'react';
import { Game } from '../../types';
import useGameState from '../../hooks/useGameState';
import { useGameStateContext } from '../../context/GameStateContext';
const HistoryScreen: React.FC = () => {
const { gameState, setCurrentScreen } = useGameState();
const { gameState, setCurrentScreen } = useGameStateContext();
const renderHistory = () => {
if (!gameState.gameHistory || gameState.gameHistory.length === 0) {