/* A component that shows a detailed view of a single picture. Wrapped with the "withDocument" container. */ import React from 'react'; import Pics from '../../modules/pics/collection.js'; import { Components, withDocument } from 'meteor/vulcan:core'; import CommentsList from '../comments/CommentsList.jsx'; import CommentsNewForm from '../comments/CommentsNewForm.jsx'; import PicsEditForm from './PicsEditForm.jsx'; import Comments from '../../modules/comments/collection.js'; const PicsDetails = ({loading, document, currentUser}) => { if (loading) { return

Loading…

} else { return (

{document.user.displayName}

{document.body} {Pics.options.mutations.edit.check(currentUser, document) ? }> : null }
{Comments.options.mutations.new.check(currentUser) ? : null }
) } } const options = { collection: Pics, fragmentName: 'PicsDetailsFragment', }; export default withDocument(options)(PicsDetails);