From 1bfb459d562429daf602cb787a1d885def841171 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 9 Jun 2023 02:23:52 +0200 Subject: [PATCH] Integration the StateContext into the App.jsx --- webui/src/App.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webui/src/App.jsx b/webui/src/App.jsx index 7f82a77..57c11f2 100644 --- a/webui/src/App.jsx +++ b/webui/src/App.jsx @@ -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 ( <> - + {currentState === "Home" && } + {currentState === "GameCreation" && } ) }