- clean up

- origins
This commit is contained in:
ari committed 2022-04-15 15:50:33 -04:00
1 parent f6af594a8f
commit 5e345d20e5
8 files changed
+2104 -21

No files matched your search

+5 -4
View File
@@ -8,17 +8,18 @@ export const useAPIService = (
) => {
// state
const [state, setState] = useDefaultApiState();
const {reload, wrapCall} = makeReloadAutomations(automationAPI, state, setState);
const { reload, wrapCall } = makeReloadAutomations(automationAPI, state, setState);
// initial load of autos
useEffect(() => {
reload();
// eslint-disable-next-line
}, []);
return {
state,
removeAutomation: wrapCall(automationAPI.remove),
updateAutomation: wrapCall(automationAPI.update),
removeAutomation: wrapCall(automationAPI.remove),
updateAutomation: wrapCall(automationAPI.update),
}
}