From bf5a4e2e5ba926d5a1e83295609bb0cf9af79443 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Fri, 20 Dec 2024 10:21:17 -0800 Subject: [PATCH] [Closes #175] Fix error causing redirect failure on new Patient (#176) --- client/src/pages/patients/patient-details/PatientDetails.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/pages/patients/patient-details/PatientDetails.jsx b/client/src/pages/patients/patient-details/PatientDetails.jsx index 7fe6debf..d3ab3ba7 100644 --- a/client/src/pages/patients/patient-details/PatientDetails.jsx +++ b/client/src/pages/patients/patient-details/PatientDetails.jsx @@ -32,6 +32,7 @@ export default function PatientDetails() { throw new Error('Failed to fetch patient.'); } }, + retry: false, }); useEffect(() => { @@ -43,7 +44,7 @@ export default function PatientDetails() { } }, [isError, navigate, patientId]); - if (isLoading) { + if (isLoading || isError) { return ; }