Skip to content

Commit

Permalink
🧹 Context proposal cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
javikalsan authored and vokimon committed Dec 22, 2023
1 parent 8b5fb0e commit 2bcab40
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions frontend/src/components/InstallationProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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()

Expand Down

0 comments on commit 2bcab40

Please sign in to comment.