2017-03-23 16:27:59 +09:00
|
|
|
import { Components, registerComponent } from 'meteor/vulcan:core';
|
2016-03-30 09:24:52 +09:00
|
|
|
import React from 'react';
|
2016-06-11 16:36:18 +09:00
|
|
|
import { Link } from 'react-router';
|
2017-03-23 16:27:59 +09:00
|
|
|
import Posts from "meteor/vulcan:posts";
|
2016-03-30 09:24:52 +09:00
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
const PostsCommenters = ({post}) => {
|
2016-02-19 10:12:08 +09:00
|
|
|
return (
|
2016-04-19 15:45:36 +09:00
|
|
|
<div className="posts-commenters">
|
|
|
|
<div className="posts-commenters-avatars">
|
2016-12-06 18:06:29 +01:00
|
|
|
{_.take(post.commenters, 4).map(user => <Components.UsersAvatar key={user._id} user={user}/>)}
|
2016-03-24 16:03:30 +09:00
|
|
|
</div>
|
2016-04-19 15:45:36 +09:00
|
|
|
<div className="posts-commenters-discuss">
|
2016-06-17 09:54:25 +09:00
|
|
|
<Link to={Posts.getPageUrl(post)}>
|
2016-12-06 18:06:29 +01:00
|
|
|
<Components.Icon name="comment" />
|
2016-04-19 15:45:36 +09:00
|
|
|
<span className="posts-commenters-comments-count">{post.commentCount}</span>
|
2016-03-24 16:03:30 +09:00
|
|
|
<span className="sr-only">Comments</span>
|
2016-06-11 16:36:18 +09:00
|
|
|
</Link>
|
2016-03-24 16:03:30 +09:00
|
|
|
</div>
|
2016-02-19 10:12:08 +09:00
|
|
|
</div>
|
2016-11-07 18:03:07 +01:00
|
|
|
);
|
|
|
|
};
|
2016-02-19 10:12:08 +09:00
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
PostsCommenters.displayName = "PostsCommenters";
|
|
|
|
|
2016-12-06 18:06:29 +01:00
|
|
|
registerComponent('PostsCommenters', PostsCommenters);
|