From 4b4da297ef2d539eeae5af0d188560e9bdccb167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20Sentu=CC=88rk?= Date: Tue, 8 Oct 2024 10:34:53 +0200 Subject: [PATCH] feat(noticeboard): show images on detail screen - added `ImageSection` to `NoticeboardFormScreen` to show images added to the noticeboard SVA-1348 --- src/screens/Noticeboard/NoticeboardFormScreen.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/screens/Noticeboard/NoticeboardFormScreen.tsx b/src/screens/Noticeboard/NoticeboardFormScreen.tsx index f6ab02104..551832195 100644 --- a/src/screens/Noticeboard/NoticeboardFormScreen.tsx +++ b/src/screens/Noticeboard/NoticeboardFormScreen.tsx @@ -6,6 +6,7 @@ import { BoldText, DefaultKeyboardAvoidingView, HtmlView, + ImageSection, LoadingContainer, NoticeboardCreateForm, NoticeboardMessageForm, @@ -64,6 +65,8 @@ export const NoticeboardFormScreen = ({ ); } + const images = details?.mediaContents?.filter((item) => item.contentType === 'image'); + const Component = isNewEntryForm ? NoticeboardCreateForm : NoticeboardMessageForm; return ( @@ -80,6 +83,8 @@ export const NoticeboardFormScreen = ({ /> } > + {!!images?.length && } + {!!html && (