2016-08-08 11:18:21 +09:00
|
|
|
import Telescope from 'meteor/nova:lib';
|
2016-03-22 10:22:46 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
2016-06-07 15:03:00 +09:00
|
|
|
import moment from 'moment';
|
2016-06-23 11:40:35 +09:00
|
|
|
import Posts from "meteor/nova:posts";
|
2016-03-30 10:52:40 +09:00
|
|
|
|
2016-04-25 17:02:41 +09:00
|
|
|
class PostsDay extends Component {
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
2016-12-05 16:30:31 +09:00
|
|
|
const {date, number, posts} = this.props;
|
2016-06-07 09:43:23 +09:00
|
|
|
|
2016-04-25 17:02:41 +09:00
|
|
|
return (
|
|
|
|
<div className="posts-day">
|
2016-12-05 16:30:31 +09:00
|
|
|
<h4 className="posts-day-heading">{date.format("dddd, MMMM Do YYYY")}</h4>
|
|
|
|
<div className="posts-list-content">
|
|
|
|
{posts.map(post => <Telescope.components.PostsItem post={post} key={post._id} />)}
|
|
|
|
</div>
|
2016-04-25 17:02:41 +09:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-03-22 10:22:46 +09:00
|
|
|
}
|
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
PostsDay.propTypes = {
|
2016-03-22 10:22:46 +09:00
|
|
|
date: React.PropTypes.object,
|
|
|
|
number: React.PropTypes.number
|
|
|
|
}
|
|
|
|
|
2016-11-17 20:42:16 +01:00
|
|
|
Telescope.registerComponent('PostsDay', PostsDay);
|