Skip to content

Commit

Permalink
feat(noticeboard): show images on detail screen
Browse files Browse the repository at this point in the history
- added `ImageSection` to `NoticeboardFormScreen` to show images added to the noticeboard

SVA-1348
  • Loading branch information
ardasnturk committed Oct 8, 2024
1 parent 47e70ff commit 4b4da29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/screens/Noticeboard/NoticeboardFormScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
BoldText,
DefaultKeyboardAvoidingView,
HtmlView,
ImageSection,
LoadingContainer,
NoticeboardCreateForm,
NoticeboardMessageForm,
Expand Down Expand Up @@ -64,6 +65,8 @@ export const NoticeboardFormScreen = ({
);
}

const images = details?.mediaContents?.filter((item) => item.contentType === 'image');

const Component = isNewEntryForm ? NoticeboardCreateForm : NoticeboardMessageForm;

return (
Expand All @@ -80,6 +83,8 @@ export const NoticeboardFormScreen = ({
/>
}
>
{!!images?.length && <ImageSection mediaContents={images} />}

<SectionHeader big title={details?.contentBlocks?.[0]?.title || details?.title} />

{!!html && (
Expand Down

0 comments on commit 4b4da29

Please sign in to comment.