From cdfdf8f571cfaa4dc6a4644f95eeed4c7a56bf11 Mon Sep 17 00:00:00 2001 From: Uday Sagar Date: Fri, 12 Jul 2024 20:57:53 +0530 Subject: [PATCH] bug fix --- src/Components/Facility/PatientNoteCard.tsx | 34 +++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/Components/Facility/PatientNoteCard.tsx b/src/Components/Facility/PatientNoteCard.tsx index 82c30e007e1..aa9bfb6b3ed 100644 --- a/src/Components/Facility/PatientNoteCard.tsx +++ b/src/Components/Facility/PatientNoteCard.tsx @@ -290,25 +290,27 @@ const PatientNoteCard = ({ >
- {note.files.map((file: any) => ( -
+ {note.files && + note.files.length > 0 && + note.files.map((file: any) => (
loadFile(file.external_id, note.id)} + key={file.id} + className="relative mt-1 h-20 w-20 cursor-pointer rounded-md bg-gray-100 shadow-sm hover:bg-gray-200" > - - - {file.name} - +
loadFile(file.external_id, note.id)} + > + + + {file.name} + +
-
- ))} + ))}
{mode == "thread-view" && note.replies.length > 0 && (