From 495673d80d75ddfc97dc8d9fe61021142418dcc2 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 16 Oct 2015 10:15:52 -0400 Subject: Fixing some client warnings --- web/react/components/rhs_comment.jsx | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'web/react/components/rhs_comment.jsx') diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index 402e64080..d3a4cfaeb 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -29,7 +29,7 @@ export default class RhsComment extends React.Component { var post = this.props.post; Client.createPost(post, post.channel_id, - function success(data) { + (data) => { AsyncClient.getPosts(post.channel_id); var channel = ChannelStore.get(post.channel_id); @@ -43,11 +43,11 @@ export default class RhsComment extends React.Component { post: data }); }, - function fail() { + () => { post.state = Constants.POST_FAILED; PostStore.updatePendingPost(post); this.forceUpdate(); - }.bind(this) + } ); post.state = Constants.POST_LOADING; @@ -84,7 +84,10 @@ export default class RhsComment extends React.Component { if (isOwner) { dropdownContents.push( -
  • +
  • - Edit + {'Edit'}
  • ); @@ -103,7 +106,10 @@ export default class RhsComment extends React.Component { if (isOwner || isAdmin) { dropdownContents.push( -
  • +
  • - Delete + {'Delete'}
  • ); @@ -162,7 +168,7 @@ export default class RhsComment extends React.Component { href='#' onClick={this.retryComment} > - Retry + {'Retry'} ); } else if (post.state === Constants.POST_LOADING) { @@ -213,14 +219,14 @@ export default class RhsComment extends React.Component {
    -

    +

    {loading}
    -

    +
    {fileAttachment}
    -- cgit v1.2.3-1-g7c22