Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2175]: optimize metrics fetching based on available sources and …
…destinations (#2160) This pull request includes changes to the `useMetrics` hook in the `frontend/webapp/hooks/overview/useMetrics.ts` file to improve its functionality by ensuring that metrics are only fetched when there are sources or destinations available. Improvements to `useMetrics` hook: * [`frontend/webapp/hooks/overview/useMetrics.ts`](diffhunk://#diff-a1494f6951b923bb9bdd816930133866b8e6ab2f8e2d61d2c9730e4ee02469beL2-R12): Modified the `useMetrics` hook to use the `useSourceCRUD` and `useDestinationCRUD` hooks for fetching sources and destinations, and updated the `skip` condition in the `useQuery` call to prevent fetching metrics when there are no sources or destinations.
- Loading branch information