Skip to content

Commit

Permalink
before final demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimalausa committed Mar 5, 2019
1 parent 35c22a6 commit 733d8c0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/components/widgets/ReactionIcons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ class ReactionIcons extends Component {
this.props.getTotalReactions(this.props.selectedArticleId);
};

createLikeIcon = () => (
<i role="presentation" onClick={this.createReaction.bind(this, 'like')}>
<Icon disabled link size="small" fitted name="thumbs up outline" />
</i>
);

createDislikeIcon = () => (
<i role="presentation" onClick={this.createReaction.bind(this, 'dislike')}>
<Icon disabled link size="small" fitted name="thumbs down outline" />
createReactionIcon = (reaction, position) => (
<i role="presentation" onClick={this.createReaction.bind(this, reaction)}>
<Icon disabled link size="small" fitted name={`thumbs ${position} outline`} />
</i>
);

Expand All @@ -37,9 +31,9 @@ class ReactionIcons extends Component {
<span>{dateFormatter(date)}</span>
</Icon>
<i className="dates">{date}</i>
{this.createLikeIcon()}
{this.createReactionIcon('like', 'up')}
{likes}
{this.createDislikeIcon()}
{this.createReactionIcon('dislike', 'down')}
{dislikes}
<i className="articleComment">
<Icon disabled link size="small" fitted name="comments outline" />
Expand Down

0 comments on commit 733d8c0

Please sign in to comment.