Skip to content

Commit

Permalink
Show loading state when switching tabs in Discussion Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny-thakurwar committed May 14, 2024
1 parent 353ebcf commit 76d60f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Components/Facility/PatientConsultationNotesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => {

const fetchNotes = async () => {
setIsLoading(true);

const { data } = await request(routes.getPatientNotes, {
pathParams: {
patientId: props.state.patientId || "",
Expand Down Expand Up @@ -80,7 +81,7 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => {
}
};

if (isLoading && !state.notes.length) {
if (isLoading) {
return (
<div className="flex h-full w-full items-center justify-center bg-white">
<CircularProgress />
Expand Down

0 comments on commit 76d60f3

Please sign in to comment.