Skip to content

Commit

Permalink
Add deleteServiceState function to useServices hook
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Feb 28, 2024
1 parent b397c3c commit 26b6239
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/hooks/useServices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ export const useServices = () => {
}),
);

const deleteServiceState = (serviceHash: ServiceHash) =>
setServices((prev) => prev.filter((s) => s.hash !== serviceHash));

return {
getService,
getServiceFromState,
getServicesFromState,
getServiceStatus,
updateServicesState,
updateServiceState,
deleteServiceState,
createService,
deployService,
stopService,
Expand Down

0 comments on commit 26b6239

Please sign in to comment.