mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
Stream Error
This commit is contained in:
@@ -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>
|
||||
);
|
||||
Reference in New Issue
Block a user