Skip to content

Commit

Permalink
[Closes #175] Fix error causing redirect failure on new Patient (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
francisli authored Dec 20, 2024
1 parent 9a15fd9 commit bf5a4e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/pages/patients/patient-details/PatientDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function PatientDetails() {
throw new Error('Failed to fetch patient.');
}
},
retry: false,
});

useEffect(() => {
Expand All @@ -43,7 +44,7 @@ export default function PatientDetails() {
}
}, [isError, navigate, patientId]);

if (isLoading) {
if (isLoading || isError) {
return <Loader />;
}

Expand Down

0 comments on commit bf5a4e2

Please sign in to comment.