Skip to content

Commit

Permalink
Changes per review
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 9, 2017
1 parent 627cd5e commit 4a9302a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/my-sites/stats/stats-post-detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ const StatsPostDetail = React.createClass( {

<PostSummary siteId={ this.props.siteId } postId={ this.props.postId } />

{ !! this.props.postId && <PostLikes siteId={ this.props.siteId } postId={ this.props.postId } /> }

<PostMonths
dataKey="years"
title={ this.props.translate( 'Months and Years' ) }
Expand All @@ -81,8 +83,6 @@ const StatsPostDetail = React.createClass( {
postViewsList={ this.props.postViewsList } />

<PostWeeks postViewsList={ this.props.postViewsList } />

{ post && <PostLikes postId={ post.ID } siteId={ this.props.siteId } /> }
</Main>
);
}
Expand Down
6 changes: 4 additions & 2 deletions client/my-sites/stats/stats-post-likes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ export const PostLikes = ( { countLikes, isRequesting, likes, opened, postId, si
{ likes && !! likes.length &&
<div className="stats-post-likes__content">
{ likes.map( like =>
<Gravatar key={ like.ID } user={ like } />
<a key={ like.ID } href={ like.URL } rel="noopener noreferrer" target="_blank">
<Gravatar user={ like } />
</a>
) }
</div>
}
{ countLikes === 0 && ! isRequesting &&
<div className="stats-post-likes__content">
{ translate( 'This post has not likes yet!' ) }
{ translate( 'There are no likes on this post yet.' ) }
</div>
}
</Card>
Expand Down

0 comments on commit 4a9302a

Please sign in to comment.