diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js
index 3acbc30d9..116c8d34e 100644
--- a/client/coral-embed-stream/src/Embed.js
+++ b/client/coral-embed-stream/src/Embed.js
@@ -3,7 +3,7 @@ import {compose} from 'react-apollo';
import {connect} from 'react-redux';
import isEqual from 'lodash/isEqual';
-import {TabBar, Tab, TabContent, Spinner, Button} from 'coral-ui';
+import {TabBar, Tab, TabContent, Spinner} from 'coral-ui';
const {logout, showSignInDialog, requestConfirmEmail} = authActions;
const {addNotification, clearNotification} = notificationActions;
@@ -25,6 +25,7 @@ import ChangeDisplayNameContainer from '../../coral-sign-in/containers/ChangeDis
import SettingsContainer from 'coral-settings/containers/SettingsContainer';
import RestrictedContent from 'coral-framework/components/RestrictedContent';
import ConfigureStreamContainer from 'coral-configure/containers/ConfigureStreamContainer';
+import LoadMore from './LoadMore';
class Embed extends Component {
@@ -77,20 +78,6 @@ class Embed extends Component {
}
}
- loadMoreComments = () => {
-
- if (!this.props.asset.comments.length) {
- return;
- }
-
- this.props.loadMore({
- limit: 10,
- cursor: this.props.asset.comments[this.props.asset.comments.length - 1].created_at,
- asset_id: this.props.asset.id,
- sort: 'REVERSE_CHRONOLOGICAL'
- });
- }
-
render () {
const {activeTab} = this.state;
const {closedAt} = this.props.asset;
@@ -170,10 +157,11 @@ class Embed extends Component {
clearNotification={this.props.clearNotification}
notification={{text: null}}
/>
-
+ asset.comments.length}
+ loadMore={this.props.loadMore}/>
{
@@ -18,7 +18,7 @@ const loadMoreComments = (id, comments, loadMore) => {
});
};
-const LoadMore = ({id, comments, loadMore}) => comments.length > 5 ?
+const LoadMore = ({id, comments, loadMore, moreComments}) => moreComments ?