2016-12-06 18:06:29 +01:00
|
|
|
import Telescope, { Components, registerComponent } from 'meteor/nova:lib';
|
2016-12-05 16:30:31 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
const PostsDaily = props => {
|
|
|
|
// const terms = props.location && props.location.query;
|
|
|
|
const numberOfDays = Telescope.settings.get('numberOfDays', 5);
|
|
|
|
const terms = {
|
|
|
|
view: 'daily',
|
|
|
|
after: moment().subtract(numberOfDays - 1, 'days').format("YYYY-MM-DD"),
|
|
|
|
before: moment().format("YYYY-MM-DD"),
|
|
|
|
};
|
|
|
|
|
2016-12-06 18:06:29 +01:00
|
|
|
return <Components.PostsDailyList terms={terms}/>
|
2016-11-03 23:00:30 -04:00
|
|
|
};
|
2016-03-22 10:22:46 +09:00
|
|
|
|
2016-12-05 16:30:31 +09:00
|
|
|
PostsDaily.displayName = "PostsDaily";
|
2016-03-22 10:22:46 +09:00
|
|
|
|
2016-12-06 18:06:29 +01:00
|
|
|
registerComponent('PostsDaily', PostsDaily);
|