Integrated the Game state into the App.jsx
This commit is contained in:
parent
c4cab41a21
commit
08fdad4989
@ -2,6 +2,7 @@ import Home from "./pages/Home";
|
|||||||
import {useContext} from "react";
|
import {useContext} from "react";
|
||||||
import {StateContext} from "@/common/contexts/StateContext";
|
import {StateContext} from "@/common/contexts/StateContext";
|
||||||
import GameCreation from "@/pages/GameCreation";
|
import GameCreation from "@/pages/GameCreation";
|
||||||
|
import Game from "@/pages/Game";
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
const {currentState} = useContext(StateContext);
|
const {currentState} = useContext(StateContext);
|
||||||
@ -10,6 +11,7 @@ const App = () => {
|
|||||||
<>
|
<>
|
||||||
{currentState === "Home" && <Home />}
|
{currentState === "Home" && <Home />}
|
||||||
{currentState === "GameCreation" && <GameCreation />}
|
{currentState === "GameCreation" && <GameCreation />}
|
||||||
|
{currentState === "Game" && <Game />}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user