Skip to content

Commit

Permalink
Refactor ServicesProvider to set services directly from API response
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Feb 28, 2024
1 parent 5289d7c commit b397c3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/context/ServicesProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export const ServicesProvider = ({ children }: PropsWithChildren) => {
const updateServicesState = useCallback(async (): Promise<void> => {
try {
return ServicesService.getServices().then((data: Service[]) => {
const activeServices = data.filter((service) => service.active); // workaround until superuser permissions resolved cross platform
setServices(activeServices);
setServices(data);
});
} catch (e) {
Promise.reject(e);
Expand Down

0 comments on commit b397c3c

Please sign in to comment.