Integrated the Game state into the App.jsx

This commit is contained in:
Mathias Wagner 2023-06-09 03:02:27 +02:00
parent c4cab41a21
commit 08fdad4989

View File

@ -2,6 +2,7 @@ import Home from "./pages/Home";
import {useContext} from "react";
import {StateContext} from "@/common/contexts/StateContext";
import GameCreation from "@/pages/GameCreation";
import Game from "@/pages/Game";
const App = () => {
const {currentState} = useContext(StateContext);
@ -10,6 +11,7 @@ const App = () => {
<>
{currentState === "Home" && <Home />}
{currentState === "GameCreation" && <GameCreation />}
{currentState === "Game" && <Game />}
</>
)
}