Skip to content

Commit

Permalink
(fix) O3-3815: Fix issues with fetching in active-visits-app (#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
IamMujuziMoses authored Aug 19, 2024
1 parent 5ae28d3 commit 3c138ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function useActiveVisits() {
const { data, error, isLoading } = useSWR<{ data: { totalCount: number } }>(getUrl, openmrsFetch);

return {
count: data?.data.totalCount,
count: data?.data?.totalCount,
error,
isLoading,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const useTotalVisits = () => {
const { data, error, isLoading } = useSWR<{ data: { results: Array<Visit> } }>(visitsUrl, openmrsFetch);

return {
data: data?.data.results,
data: data?.data?.results,
error,
isLoading,
};
Expand Down

0 comments on commit 3c138ec

Please sign in to comment.