diff --git a/client/coral-embed-stream/src/components/Stream.js b/client/coral-embed-stream/src/components/Stream.js index 43176353f..af2ec698b 100644 --- a/client/coral-embed-stream/src/components/Stream.js +++ b/client/coral-embed-stream/src/components/Stream.js @@ -201,7 +201,7 @@ class Stream extends React.Component { data, root, appendItemArray, - root: {asset, asset: {comment: highlightedComment, comments}}, + root: {asset, asset: {comment: highlightedComment}}, postComment, notify, updateItem, @@ -222,9 +222,8 @@ class Stream extends React.Component { const slotProps = {data}; const slotQueryData = {root, asset}; - if (!highlightedComment && !comments) { - console.error('Talk: No comments came back from the graph given that query. Please, check the query params.'); - return ; + if (highlightedComment === null) { + return {t('stream.comment_not_found')}; } return ( diff --git a/client/coral-embed-stream/src/components/StreamError.js b/client/coral-embed-stream/src/components/StreamError.js index 2e8b8ff96..2c381c720 100644 --- a/client/coral-embed-stream/src/components/StreamError.js +++ b/client/coral-embed-stream/src/components/StreamError.js @@ -1,9 +1,8 @@ import React from 'react'; import styles from './StreamError.css'; -import t from 'coral-framework/services/i18n'; -export const StreamError = () => ( +export const StreamError = ({children}) => (
- {t('common.error')} + {children}
); diff --git a/client/coral-embed-stream/src/containers/Stream.js b/client/coral-embed-stream/src/containers/Stream.js index 0a701a029..6c3d7b02c 100644 --- a/client/coral-embed-stream/src/containers/Stream.js +++ b/client/coral-embed-stream/src/containers/Stream.js @@ -178,7 +178,7 @@ class StreamContainer extends React.Component { render() { if (!this.props.root.asset - || !this.props.root.asset.comment + || this.props.root.asset.comment === undefined && !this.props.root.asset.comments ) { return ; diff --git a/locales/en.yml b/locales/en.yml index 6d94393b2..9e1bf1056 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -323,6 +323,7 @@ en: user_no_comment: "You've never left a comment. Join the conversation!" stream: temporarily_suspended: "In accordance with {0}'s community guidelines, your account has been temporarily suspended. Please rejoin the conversation {1}." + comment_not_found: "Comment was not found" step_1_header: "Report an issue" step_2_header: "Help us understand" step_3_header: "Thank you for your input" diff --git a/locales/es.yml b/locales/es.yml index db25ab527..83edac80b 100644 --- a/locales/es.yml +++ b/locales/es.yml @@ -349,6 +349,7 @@ es: step_3_header: "Gracias por tu participación" stream: temporarily_suspended: "De acuerdo con la guía de la comunidad de {0}, su cuenta ha sido temporalmente suspendida. Por favor unirse a la conversación {1}." + comment_not_found: "Comentario no encontrado" streams: all: "Todos" article: "Artículo"