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 6, 2019
1 parent af5c4e3 commit 3840dfc
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/components/widgets/ReactionIcons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ 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>
);
componentWillUnmount = () => {
this.clearTimer();
};

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 +35,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 3840dfc

Please sign in to comment.