From 150a5ba28e8aa3bf8ee2f69ab37e8dc0d1307c5c Mon Sep 17 00:00:00 2001 From: vivek Date: Thu, 23 Nov 2023 23:14:58 +0530 Subject: [PATCH] Refactor onClick event in ConsultationDetails component --- src/Components/Facility/ConsultationDetails/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index 7e7664707eb..8d511347c65 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -371,7 +371,13 @@ export const ConsultationDetails = (props: any) => { setShowPatientNotesPopup(true)} + onClick={() => + showPatientNotesPopup + ? navigate( + `/facility/${facilityId}/patient/${patientId}/notes` + ) + : setShowPatientNotesPopup(true) + } className="btn btn-primary m-1 w-full hover:text-white" > Doctor's Notes