mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
19 lines
608 B
JavaScript
19 lines
608 B
JavaScript
import { Components, registerComponent, getSetting } from 'meteor/vulcan:core';
|
|
import React, { PropTypes, Component } from 'react';
|
|
import moment from 'moment';
|
|
|
|
const PostsDaily = props => {
|
|
// const terms = props.location && props.location.query;
|
|
const numberOfDays = getSetting('numberOfDays', 5);
|
|
const terms = {
|
|
view: 'top',
|
|
after: moment().subtract(numberOfDays - 1, 'days').format("YYYY-MM-DD"),
|
|
before: moment().format("YYYY-MM-DD"),
|
|
};
|
|
|
|
return <Components.PostsDailyList terms={terms}/>
|
|
};
|
|
|
|
PostsDaily.displayName = "PostsDaily";
|
|
|
|
registerComponent('PostsDaily', PostsDaily);
|