From 1d31099c9d0fba3feb027815a18f895663037a0f Mon Sep 17 00:00:00 2001 From: okbel Date: Mon, 5 Mar 2018 08:49:59 -0300 Subject: [PATCH] Passing down root data --- .../src/tabs/stream/components/CommentForm.js | 5 ++++- .../src/tabs/stream/components/ReplyBox.js | 5 ++++- .../src/tabs/stream/components/Stream.js | 1 + .../src/tabs/stream/containers/CommentBox.js | 11 ++++++++++- .../src/tabs/stream/containers/DraftArea.js | 5 +++-- yarn.lock | 8 +------- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js b/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js index b4f636f46..65937b3ce 100644 --- a/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js +++ b/client/coral-embed-stream/src/tabs/stream/components/CommentForm.js @@ -50,10 +50,11 @@ class CommentForm extends React.Component { onCancel: PropTypes.func, state: PropTypes.string, loadingState: PropTypes.oneOf(['', 'loading', 'success', 'error']), - comment: PropTypes.object, registerHook: PropTypes.func, unregisterHook: PropTypes.func, isReply: PropTypes.bool, + root: PropTypes.object.isRequired, + comment: PropTypes.object, }; static get defaultProps() { return { @@ -92,6 +93,7 @@ class CommentForm extends React.Component { body, loadingState, comment, + root, } = this.props; const length = body.length; @@ -109,6 +111,7 @@ class CommentForm extends React.Component { return (
} {showCommentBox && (