Merge pull request #403 from ThibG/glitch-soc/fixes/attachment-lists-fixup

Fix attachment lists
signup-info-prompt
David Yip 2018-03-28 16:38:53 -05:00 committed by GitHub
commit d37a79adce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -40,12 +40,14 @@ export default class AttachmentList extends ImmutablePureComponent {
</div>
<ul className='attachment-list__list'>
const displayUrl = attachment.get('remote_url') || attachment.get('url');
{media.map(attachment => {
return (<li key={attachment.get('id')}>
<a href={displayUrl} target='_blank' rel='noopener'>{filename(displayUrl)}</a>
</li>)
const displayUrl = attachment.get('remote_url') || attachment.get('url');
return (
<li key={attachment.get('id')}>
<a href={displayUrl} target='_blank' rel='noopener'>{filename(displayUrl)}</a>
</li>
);
})}
</ul>
</div>