Integration the StateContext into the App.jsx
This commit is contained in:
parent
141644c6d2
commit
1bfb459d56
@ -1,9 +1,15 @@
|
||||
import Home from "./pages/Home";
|
||||
import {useContext} from "react";
|
||||
import {StateContext} from "@/common/contexts/StateContext";
|
||||
import GameCreation from "@/pages/GameCreation";
|
||||
|
||||
const App = () => {
|
||||
const {currentState} = useContext(StateContext);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Home />
|
||||
{currentState === "Home" && <Home />}
|
||||
{currentState === "GameCreation" && <GameCreation />}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user