Skip to content

Commit

Permalink
Show loading state when switching tabs in Discussion Notes (#7819)
Browse files Browse the repository at this point in the history
* Show loading state when switching tabs in Discussion Notes

* fixed patient note list loading
  • Loading branch information
sunny-thakurwar authored May 22, 2024
1 parent 374d11c commit 8582bbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion src/Components/Facility/PatientNotesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const PatientNotesList = (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 8582bbd

Please sign in to comment.