diff --git a/client/coral-embed-stream/src/tabs/stream/components/Stream.js b/client/coral-embed-stream/src/tabs/stream/components/Stream.js index b097f3d57..73b4fbcfd 100644 --- a/client/coral-embed-stream/src/tabs/stream/components/Stream.js +++ b/client/coral-embed-stream/src/tabs/stream/components/Stream.js @@ -206,15 +206,30 @@ class Stream extends React.Component { ); } + renderQuestionBox() { + const { + root, + asset, + asset: { + settings: { questionBoxEnable, questionBoxContent, questionBoxIcon }, + }, + } = this.props; + const slotPassthrough = { root, asset }; + if (questionBoxEnable) { + return ( + + + + ); + } + } + render() { const { root, appendItemArray, asset, - asset: { - comment: highlightedComment, - settings: { questionBoxEnable }, - }, + asset: { comment: highlightedComment }, postComment, notify, updateItem, @@ -260,14 +275,7 @@ class Stream extends React.Component { content={asset.settings.infoBoxContent} enable={asset.settings.infoBoxEnable} /> - {questionBoxEnable && ( - - - - )} + {this.renderQuestionBox()} {!banned && temporarilySuspended && ( @@ -305,6 +313,7 @@ class Stream extends React.Component { ) : ( )} + {this.renderQuestionBox()} )}