import React from 'react'; import { DocumentListItem } from './DocumentListItem'; import { MediaGridItem } from './MediaGridItem'; import { missingCaseError } from '../../../util/missingCaseError'; import { MediaItemType } from '../../lightbox/LightboxGallery'; type Props = { type: 'media' | 'documents'; mediaItems: Array; }; const Items = (props: Props): JSX.Element => { const { mediaItems, type } = props; return ( <> {mediaItems.map((mediaItem, position, array) => { const shouldShowSeparator = position < array.length - 1; const { index, attachment, messageTimestamp, messageId } = mediaItem; switch (type) { case 'media': return ( ); case 'documents': return ( ); default: return missingCaseError(type); } })} ); }; export const AttachmentSection = (props: Props) => { const { type } = props; return (
); };