From f6c39b3d9baf15e07b5becea7b4a06fc88c676b5 Mon Sep 17 00:00:00 2001 From: Uday Sagar Date: Fri, 12 Jul 2024 21:20:17 +0530 Subject: [PATCH] code review --- .../Facility/DoctorNoteReplyPreviewCard.tsx | 7 ++-- src/Components/Facility/PatientNoteCard.tsx | 35 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Components/Facility/DoctorNoteReplyPreviewCard.tsx b/src/Components/Facility/DoctorNoteReplyPreviewCard.tsx index aa673fafee6..c99f0bf2118 100644 --- a/src/Components/Facility/DoctorNoteReplyPreviewCard.tsx +++ b/src/Components/Facility/DoctorNoteReplyPreviewCard.tsx @@ -16,7 +16,10 @@ const DoctorNoteReplyPreviewCard = ({ children, cancelReply, }: Props) => { - return parentNote ? ( + if (!parentNote) { + return children; + } + return (
@@ -64,8 +67,6 @@ const DoctorNoteReplyPreviewCard = ({
{children}
- ) : ( -
{children}
); }; diff --git a/src/Components/Facility/PatientNoteCard.tsx b/src/Components/Facility/PatientNoteCard.tsx index aa9bfb6b3ed..f65a45dc764 100644 --- a/src/Components/Facility/PatientNoteCard.tsx +++ b/src/Components/Facility/PatientNoteCard.tsx @@ -290,27 +290,26 @@ const PatientNoteCard = ({ >
- {note.files && - note.files.length > 0 && - note.files.map((file: any) => ( + {/* temporaryly marked as any due to external_id */} + {note?.files?.map((file: any) => ( +
loadFile(file.external_id, note.id)} > -
loadFile(file.external_id, note.id)} - > - - - {file.name} - -
+ + + {file.name} +
- ))} +
+ ))}
{mode == "thread-view" && note.replies.length > 0 && (