/* List of pics. Wrapped with the "withList" and "withCurrentUser" containers. */ import React from 'react'; import { Components, withList, withCurrentUser, Loading } from 'meteor/vulcan:core'; import Pics from '../../modules/pics/collection.js'; import PicsItem from './PicsItem.jsx'; const PicsList = ({results = [], currentUser, loading, loadMore, count, totalCount}) => (
{loading ? :
{results.map(pic => )}
{totalCount > results.length ? {e.preventDefault(); loadMore();}}>Load More ({count}/{totalCount}) :

No more items.

}
}
); const options = { collection: Pics, fragmentName: 'PicsItemFragment', limit: 6 }; export default withList(options)(withCurrentUser(PicsList));