AttachmentThumbs: make visible

This commit is contained in:
Alex Gleason 2022-10-10 15:16:35 -05:00
parent 67d47cdafd
commit bb1823ee6d
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -6,9 +6,10 @@ import Bundle from 'soapbox/features/ui/components/bundle';
import { MediaGallery } from 'soapbox/features/ui/util/async-components'; import { MediaGallery } from 'soapbox/features/ui/util/async-components';
import type { List as ImmutableList } from 'immutable'; import type { List as ImmutableList } from 'immutable';
import type { Attachment } from 'soapbox/types/entities';
interface IAttachmentThumbs { interface IAttachmentThumbs {
media: ImmutableList<Immutable.Record<any>> media: ImmutableList<Attachment>
onClick?(): void onClick?(): void
sensitive?: boolean sensitive?: boolean
} }
@ -18,7 +19,7 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const renderLoading = () => <div className='media-gallery--compact' />; const renderLoading = () => <div className='media-gallery--compact' />;
const onOpenMedia = (media: Immutable.Record<any>, index: number) => dispatch(openModal('MEDIA', { media, index })); const onOpenMedia = (media: ImmutableList<Attachment>, index: number) => dispatch(openModal('MEDIA', { media, index }));
return ( return (
<div className='attachment-thumbs'> <div className='attachment-thumbs'>
@ -30,6 +31,7 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => {
height={50} height={50}
compact compact
sensitive={sensitive} sensitive={sensitive}
visible
/> />
)} )}
</Bundle> </Bundle>