Removing unnecessary functions

This commit is contained in:
Belén Curcio
2018-05-11 13:22:48 -03:00
committed by GitHub
parent 32d615527a
commit 622b79b491
@@ -11,16 +11,6 @@ import { getTotalReactionsCount } from 'coral-framework/utils';
import t from 'coral-framework/services/i18n';
class Comment extends React.Component {
goToStory = () => {
this.props.navigate(this.props.comment.asset.url);
};
goToConversation = () => {
this.props.navigate(
`${this.props.comment.asset.url}?commentId=${this.props.comment.id}`
);
};
render() {
const { comment, root } = this.props;
const reactionCount = getTotalReactionsCount(comment.action_summaries);
@@ -76,7 +66,7 @@ class Comment extends React.Component {
<div className="my-comment-asset">
<a
className={cn(styles.assetURL, 'my-comment-anchor')}
onClick={this.goToStory}
href={this.props.comment.asset.url}
>
{t('common.story')}:{' '}
{comment.asset.title ? comment.asset.title : comment.asset.url}
@@ -86,7 +76,7 @@ class Comment extends React.Component {
<div className={styles.sidebar}>
<ul>
<li>
<a onClick={this.goToConversation} className={styles.viewLink}>
<a className={styles.viewLink} href={`${this.props.comment.asset.url}?commentId=${this.props.comment.id}`}>
<Icon name="open_in_new" className={styles.iconView} />
{t('view_conversation')}
</a>