From fb503798e8f242c0901fd58b9a084c9708bc61fd Mon Sep 17 00:00:00 2001 From: riley Date: Mon, 20 Mar 2017 14:46:59 -0600 Subject: [PATCH] use the reply id so we don't get weird behavior. fix a console warning --- client/coral-embed-stream/src/Comment.js | 5 ++++- client/coral-embed-stream/src/LoadMore.js | 3 +++ .../graphql/fragments/commentView.graphql | 3 +++ .../coral-framework/graphql/queries/index.js | 19 +++++++++++++++---- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js index 06352ec2f..3fdf5ccd7 100644 --- a/client/coral-embed-stream/src/Comment.js +++ b/client/coral-embed-stream/src/Comment.js @@ -155,6 +155,9 @@ class Comment extends React.Component { ? : null } + +

parent_id {comment.parent ? comment.parent.id : 'no parent'}

+

id: {comment.id}

@@ -232,7 +235,7 @@ class Comment extends React.Component { removeCommentTag={removeCommentTag} showSignInDialog={showSignInDialog} reactKey={reply.id} - key={`${reply.id}:${depth}`} + key={reply.id} comment={reply} />; }) } diff --git a/client/coral-embed-stream/src/LoadMore.js b/client/coral-embed-stream/src/LoadMore.js index bf89793d0..ad6dd65bd 100644 --- a/client/coral-embed-stream/src/LoadMore.js +++ b/client/coral-embed-stream/src/LoadMore.js @@ -7,6 +7,8 @@ const lang = new I18n(translations); const loadMoreComments = (assetId, comments, loadMore, parentId) => { + console.log('loadMoreComments', comments, comments.length); + if (!comments.length) { return; } @@ -48,6 +50,7 @@ class LoadMore extends React.Component { ?