From 76d60f39bad10ba79e08c856109ad953a3089eff Mon Sep 17 00:00:00 2001 From: Sunny Thakurwar <87633236+sunny-thakurwar@users.noreply.github.com> Date: Wed, 15 May 2024 01:08:43 +0530 Subject: [PATCH] Show loading state when switching tabs in Discussion Notes --- src/Components/Facility/PatientConsultationNotesList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Components/Facility/PatientConsultationNotesList.tsx b/src/Components/Facility/PatientConsultationNotesList.tsx index e7e0bb2550..f81ef122f6 100644 --- a/src/Components/Facility/PatientConsultationNotesList.tsx +++ b/src/Components/Facility/PatientConsultationNotesList.tsx @@ -26,6 +26,7 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => { const fetchNotes = async () => { setIsLoading(true); + const { data } = await request(routes.getPatientNotes, { pathParams: { patientId: props.state.patientId || "", @@ -80,7 +81,7 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => { } }; - if (isLoading && !state.notes.length) { + if (isLoading) { return (