/* 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 { registerComponent, Components, withDocument } from 'meteor/vulcan:core'; const PicsDetails = ({loading, document, currentUser}) => { if (loading) { return

Loading…

} else { return (

{document.user.displayName}

{document.body} {Pics.options.mutations.edit.check(currentUser, document) ? }> : null }
) } } const options = { collection: Pics, fragmentName: 'PicsDetailsFragment', }; registerComponent('PicsDetails', PicsDetails, [withDocument, options]);