From 4bb9b3f9745cb128452dbc23bbbafef155e9fc10 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 9 Jun 2023 02:21:40 +0200 Subject: [PATCH] Created the StateContext.jsx --- .../common/contexts/StateContext/StateContext.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 webui/src/common/contexts/StateContext/StateContext.jsx diff --git a/webui/src/common/contexts/StateContext/StateContext.jsx b/webui/src/common/contexts/StateContext/StateContext.jsx new file mode 100644 index 0000000..930c6ae --- /dev/null +++ b/webui/src/common/contexts/StateContext/StateContext.jsx @@ -0,0 +1,13 @@ +import {createContext, useState} from "react"; + +export const StateContext = createContext({}); + +export const StateProvider = ({ children }) => { + const [currentState, setCurrentState] = useState("Home"); + + return ( + + {children} + + ) +} \ No newline at end of file