diff --git a/plugins/coral-plugin-like/client/components/LikeButton.js b/plugins/coral-plugin-like/client/components/LikeButton.js index 0ae758ca0..b91ffd42a 100644 --- a/plugins/coral-plugin-like/client/components/LikeButton.js +++ b/plugins/coral-plugin-like/client/components/LikeButton.js @@ -1,22 +1,24 @@ -import React, {Component} from 'react'; +import React, { Component } from 'react'; import styles from './style.css'; import Icon from './Icon'; -import {I18n} from 'coral-framework'; +import { I18n } from 'coral-framework'; import cn from 'classnames'; import translations from '../translations.json'; -import {getMyActionSummary, getTotalActionCount} from 'coral-framework/utils'; +import { getMyActionSummary, getTotalActionCount } from 'coral-framework/utils'; const lang = new I18n(translations); const name = 'coral-plugin-like'; class LikeButton extends Component { - handleClick = () => { - const {postLike, showSignInDialog, deleteAction} = this.props; - const {root: {me}, comment} = this.props; + const { postLike, showSignInDialog, deleteAction } = this.props; + const { root: { me }, comment } = this.props; - const myLikeActionSummary = getMyActionSummary('LikeActionSummary', comment); + const myLikeActionSummary = getMyActionSummary( + 'LikeActionSummary', + comment + ); // If the current user does not exist, trigger sign in dialog. if (!me) { @@ -37,10 +39,10 @@ class LikeButton extends Component { item_type: 'COMMENTS' }); } - } + }; render() { - const {comment} = this.props; + const { comment } = this.props; if (!comment) { return null; @@ -52,10 +54,27 @@ class LikeButton extends Component { return (