diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-10-31 03:22:02 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-11-05 23:33:21 +0100 |
commit | d3ed791ab52eaddb7690869bb1cd982453badd95 (patch) | |
tree | 2d54a05d955ac860794492d4c129fad8ebc231cc /web/react/components/post_body.jsx | |
parent | d96cb50b68adca9f035c7582f1ceefdde64fb4f7 (diff) | |
download | chat-d3ed791ab52eaddb7690869bb1cd982453badd95.tar.gz chat-d3ed791ab52eaddb7690869bb1cd982453badd95.tar.bz2 chat-d3ed791ab52eaddb7690869bb1cd982453badd95.zip |
attachments frontend
Diffstat (limited to 'web/react/components/post_body.jsx')
-rw-r--r-- | web/react/components/post_body.jsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index e4094daf3..4da13dace 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -7,6 +7,7 @@ const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const TextFormatting = require('../utils/text_formatting.jsx'); const twemoji = require('twemoji'); +const PostAttachmentList = require('./post_attachment_list.jsx'); export default class PostBody extends React.Component { constructor(props) { @@ -316,6 +317,15 @@ export default class PostBody extends React.Component { ); } + let postAttachments = ''; + if (post.attachments && post.attachments.length) { + postAttachments = ( + <PostAttachmentList + attachments={post.attachments} + /> + ); + } + return ( <div className='post-body'> {comment} @@ -331,6 +341,7 @@ export default class PostBody extends React.Component { dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.state.message)}} /> </div> + {postAttachments} {fileAttachmentHolder} {embed} </div> |