Skip to content

Commit

Permalink
add no records placeholder for abdm records when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed May 17, 2024
1 parent 76f0bd9 commit 121208e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Components/ABDM/ABDMRecordsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@ export default function ABDMRecordsTab({ patientId }: IProps) {
<Loading />;
}

if (!data?.results.length) {
return (
<div className="mt-12 flex flex-col items-center justify-center gap-2.5">
<p className="font-semibold text-gray-600">No Records found</p>
<p className="text-sm text-gray-600">
Raise a consent request to fetch patient records over ABDM
</p>
</div>
);
}

return (
<div className="mt-6 flex flex-col gap-6">
{data?.results.map((record) => {
Expand Down

0 comments on commit 121208e

Please sign in to comment.