/* List of pics. Wrapped with the "withList" and "withCurrentUser" containers. */ import React from 'react'; import { registerComponent, Components, withList, withCurrentUser, Loading } from 'meteor/vulcan:core'; import Pics from '../../modules/pics/collection.js'; 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 }; registerComponent('PicsList', PicsList, withCurrentUser, [withList, options]);