diff options
Diffstat (limited to 'web/react/components/post_body.jsx')
-rw-r--r-- | web/react/components/post_body.jsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 7138e2cb4..e4094daf3 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -50,7 +50,6 @@ export default class PostBody extends React.Component { componentDidUpdate() { this.parseEmojis(); - this.props.resize(); } componentWillReceiveProps(nextProps) { @@ -78,12 +77,12 @@ export default class PostBody extends React.Component { this.isGifLoading = true; const gif = new Image(); - gif.src = src; gif.onload = ( () => { this.setState({gifLoaded: true}); } ); + gif.src = src; } createGifEmbed(link) { @@ -93,7 +92,12 @@ export default class PostBody extends React.Component { if (!this.state.gifLoaded) { this.loadGif(link); - return null; + return ( + <img + className='gif-div placeholder' + height='500px' + /> + ); } return ( @@ -338,6 +342,5 @@ PostBody.propTypes = { post: React.PropTypes.object.isRequired, parentPost: React.PropTypes.object, retryPost: React.PropTypes.func.isRequired, - handleCommentClick: React.PropTypes.func.isRequired, - resize: React.PropTypes.func.isRequired + handleCommentClick: React.PropTypes.func.isRequired }; |