From 93dfe2be64e8658839bcfe5356adf35f8cde7075 Mon Sep 17 00:00:00 2001
From: Nicolas James <Eele1Ephe7uZahRie@tutanota.com>
Date: Thu, 13 Feb 2025 18:04:18 +1100
Subject: initial commit

---
 src/web/contexts/StateContext.jsx | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 src/web/contexts/StateContext.jsx

(limited to 'src/web/contexts/StateContext.jsx')

diff --git a/src/web/contexts/StateContext.jsx b/src/web/contexts/StateContext.jsx
new file mode 100644
index 0000000..91579a4
--- /dev/null
+++ b/src/web/contexts/StateContext.jsx
@@ -0,0 +1,17 @@
+import React, {createContext, useState} from "react";
+
+// Our StateContext are some variables which we want shared between components.
+const StateContext = createContext(null);
+function StateContextProvider({children}) {
+    const state = useState({
+        loginActive: false,
+    });
+
+    return (
+        <StateContext.Provider value={state}>
+            {children}
+        </StateContext.Provider>
+    );
+}
+
+export {StateContext, StateContextProvider};
\ No newline at end of file
-- 
cgit v1.2.3

