diff --git a/app/soapbox/components/attachment_thumbs.js b/app/soapbox/components/attachment_thumbs.js new file mode 100644 index 000000000..60532e00e --- /dev/null +++ b/app/soapbox/components/attachment_thumbs.js @@ -0,0 +1,43 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import PropTypes from 'prop-types'; +import ImmutablePropTypes from 'react-immutable-proptypes'; +import ImmutablePureComponent from 'react-immutable-pure-component'; +import { MediaGallery } from 'soapbox/features/ui/util/async-components'; +import { openModal } from 'soapbox/actions/modal'; +import Bundle from 'soapbox/features/ui/components/bundle'; + +export default @connect() +class AttachmentThumbs extends ImmutablePureComponent { + + static propTypes = { + dispatch: PropTypes.func.isRequired, + media: ImmutablePropTypes.list.isRequired, + }; + + renderLoading() { + return
; + } + + onOpenMedia = (media, index) => { + this.props.dispatch(openModal('MEDIA', { media, index })); + } + + render() { + const { media } = this.props; + + return ( +