From 2bcab40a387ed8422996d5615794dc4794605501 Mon Sep 17 00:00:00 2001 From: javikalsan <1070397+javikalsan@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:09:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Context=20proposal=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/InstallationProvider.jsx | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/frontend/src/components/InstallationProvider.jsx b/frontend/src/components/InstallationProvider.jsx index 2a501c95..391836a1 100644 --- a/frontend/src/components/InstallationProvider.jsx +++ b/frontend/src/components/InstallationProvider.jsx @@ -5,23 +5,8 @@ import ovapi from '../services/ovapi' const InstallationContext = React.createContext() export default function InstallationProvider({ children }) { - // const [installations, setInstallations] = React.useState([]) const { currentUser } = useAuth() - //const closeDialog = () => { - // setDialogs((dialogs) => { - // const latestDialog = dialogs.pop() - // if (!latestDialog) return dialogs - // if (latestDialog.onClose) latestDialog.onClose() - // return [...dialogs].concat({ ...latestDialog, open: false }) - // }) - //} - - - // const reloadUser = () => { - // ov.currentUser().then((user) => setCurrentUser(user)) - // } - const getInstallations = () => { return ovapi.installations(currentUser) .then((data) => { @@ -36,13 +21,6 @@ export default function InstallationProvider({ children }) { // throw error; }); }; - - - // const getInstallations = () => { - // return [1,2,3]// Use the data here or perform additional actions - // }; - - const contextValue = getInstallations()