Skip to content

Commit

Permalink
fix loading state and bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Jan 8, 2024
1 parent 713a55d commit f707015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Facility/CentralNursingStation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function CentralNursingStation({ facilityId }: Props) {
offset: (qParams.page ? qParams.page - 1 : 0) * PER_PAGE_LIMIT,
asset_class: "HL7MONITOR",
ordering: qParams.ordering || "bed__name",
bed_is_occupied: qParams.hide_monitors_without_patient ? true : false,
bed_is_occupied: qParams.hide_monitors_without_patient === "true",
},
});

Expand Down Expand Up @@ -190,7 +190,7 @@ export default function CentralNursingStation({ facilityId }: Props) {
</div>
}
>
{data === undefined ? (
{data === undefined || query.loading ? (
<Loading />
) : data.length === 0 ? (
<div className="flex h-[80vh] w-full items-center justify-center text-center text-black">
Expand Down

0 comments on commit f707015

Please sign in to comment.