From 8292654d277adc120ccf6081c31a2239ecf4e7e4 Mon Sep 17 00:00:00 2001 From: Shemy Gan Date: Fri, 13 Dec 2024 15:58:52 -0500 Subject: [PATCH] - Add context provider for both tabs --- Client/src/Pages/Status/TabContext/index.jsx | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Client/src/Pages/Status/TabContext/index.jsx diff --git a/Client/src/Pages/Status/TabContext/index.jsx b/Client/src/Pages/Status/TabContext/index.jsx new file mode 100644 index 000000000..75567d7a8 --- /dev/null +++ b/Client/src/Pages/Status/TabContext/index.jsx @@ -0,0 +1,29 @@ +import { createContext, useState, React } from 'react'; + +const StatusFormContext = createContext({ + form: {}, + setForm: ()=>{}, +}); + +const StatusFormProvider = ({ children }) => { + const [form, setForm] = useState({ + companyName: "", + url: "", + timezone: "America/Toronto", + color: "#4169E1", + //which fields matching below? + publish: false, + logo: null, + monitors: [], + showUptimePercentage: false, + showBarcode: false, + }); + + return ( + + {children} + + ); +}; + +export { StatusFormContext, StatusFormProvider }; \ No newline at end of file