mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 13:45:40 +08:00
Removing unnecessary functions
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user