Vulcan/packages/nova-base-components/lib/posts/PostsHome.jsx

30 lines
781 B
React
Raw Normal View History

2016-06-10 19:19:32 +09:00
import React from 'react';
2016-06-11 16:36:18 +09:00
import { ListContainer, DocumentContainer } from "meteor/utilities:react-list-container";
2016-06-10 19:19:32 +09:00
const PostsHome = (props, context) => {
2016-06-11 16:36:18 +09:00
const params = _.isEmpty(props.params) ? {view: 'top'} : _.clone(props.params);
params.listId = "posts.list.main";
const {selector, options} = Posts.parameters.get(params);
2016-06-10 19:19:32 +09:00
return (
2016-06-11 16:36:18 +09:00
<ListContainer
collection={Posts}
publication="posts.list"
selector={selector}
options={options}
terms={params}
joins={Posts.getJoins()}
component={Telescope.components.PostsList}
cacheSubscription={false}
listId={params.listId}
limit={Telescope.settings.get("postsPerPage", 10)}
/>
2016-06-10 19:19:32 +09:00
)
2016-06-11 16:36:18 +09:00
2016-06-10 19:19:32 +09:00
};
PostsHome.displayName = "PostsHome";
module.exports = PostsHome;