Stream Error

This commit is contained in:
Belen Curcio
2017-06-29 11:06:52 -03:00
parent ddac5c2c85
commit db9c3b45c1
3 changed files with 15 additions and 3 deletions
@@ -1,5 +1,6 @@
import React, {PropTypes} from 'react';
import LoadMore from './LoadMore';
import {StreamError} from './StreamError';
import Comment from '../components/Comment';
import SuspendedAccount from './SuspendedAccount';
import Slot from 'coral-framework/components/Slot';
@@ -189,9 +190,9 @@ class Stream extends React.Component {
const showCommentBox = loggedIn && ((!banned && !temporarilySuspended && !highlightedComment) || keepCommentBox);
if (!comment && !comments) {
console.error('No comments came back from the graph given that query. Please, check the query params.');
return <div> An error has occured! </div>;
if (!comment && !comments) {
console.error('Talk: No comments came back from the graph given that query. Please, check the query params.');
return <StreamError />;
}
return (
@@ -0,0 +1,3 @@
.streamError {
padding: 10px 0;
}
@@ -0,0 +1,8 @@
import React from 'react';
import styles from './StreamError.css';
export const StreamError = () => (
<div className={styles.streamError}>
An error has occured!
</div>
);