From 8f95e2931534a68829e7b5f610d725428a8acdae Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Fri, 20 Jan 2017 12:41:33 -0700 Subject: [PATCH] Stream is a separate component that renders comments --- client/coral-embed-stream/src/Embed.js | 8 ++------ client/coral-embed-stream/src/Stream.js | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index 32f4628d4..69adcfed1 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -11,7 +11,7 @@ import { authActions } from '../../coral-framework'; -import Comment from './Comment'; +import Stream from './Stream'; import CommentBox from '../../coral-plugin-commentbox/CommentBox'; import InfoBox from '../../coral-plugin-infobox/InfoBox'; @@ -156,11 +156,7 @@ class Embed extends Component { refetch={refetch} showSignInDialog={showSignInDialog}/> } - { - asset.comments.map(comment => { - return ; - }) - } + { { + return ( +
+ { + comments.map(comment => { + return ; + }) + } +
+ ); +}; + +Stream.propTypes = { + comments: PropTypes.array.isRequired +}; + +export default Stream;