diff --git a/client/coral-admin/src/components/CommentDetails.js b/client/coral-admin/src/components/CommentDetails.js index 7a45219af..a9c0884a4 100644 --- a/client/coral-admin/src/components/CommentDetails.js +++ b/client/coral-admin/src/components/CommentDetails.js @@ -25,11 +25,10 @@ class CommentDetails extends Component { }; render() { - const { data, root, comment, clearHeightCache } = this.props; + const { root, comment, clearHeightCache } = this.props; const { showDetail } = this.state; const slotPassthrough = { - data, clearHeightCache, root, comment, @@ -56,7 +55,6 @@ class CommentDetails extends Component { } CommentDetails.propTypes = { - data: PropTypes.object.isRequired, root: PropTypes.object.isRequired, comment: PropTypes.object.isRequired, clearHeightCache: PropTypes.func, diff --git a/client/coral-admin/src/components/UserDetail.js b/client/coral-admin/src/components/UserDetail.js index db71b3b78..31ad999dc 100644 --- a/client/coral-admin/src/components/UserDetail.js +++ b/client/coral-admin/src/components/UserDetail.js @@ -98,7 +98,6 @@ class UserDetail extends React.Component { renderLoaded() { const { - data, root, root: { me, user, totalComments, rejectedComments }, activeTab, @@ -124,7 +123,6 @@ class UserDetail extends React.Component { const suspended = isSuspended(user); const slotPassthrough = { - data, root, user, }; @@ -303,7 +301,6 @@ class UserDetail extends React.Component { - + ); } @@ -135,7 +133,6 @@ class UserDetailComment extends React.Component { UserDetailComment.propTypes = { selected: PropTypes.bool, - data: PropTypes.object, user: PropTypes.object.isRequired, viewUserDetail: PropTypes.func.isRequired, acceptComment: PropTypes.func.isRequired, diff --git a/client/coral-admin/src/components/UserDetailCommentList.js b/client/coral-admin/src/components/UserDetailCommentList.js index a0ff9982b..3a31ee3f9 100644 --- a/client/coral-admin/src/components/UserDetailCommentList.js +++ b/client/coral-admin/src/components/UserDetailCommentList.js @@ -9,7 +9,6 @@ import ApproveButton from './ApproveButton'; const UserDetailCommentList = props => { const { - data, root, root: { user, comments: { nodes, hasNextPage } }, acceptComment, @@ -70,7 +69,6 @@ const UserDetailCommentList = props => { key={comment.id} user={user} root={root} - data={data} comment={comment} acceptComment={acceptComment} rejectComment={rejectComment} @@ -93,7 +91,6 @@ UserDetailCommentList.propTypes = { root: PropTypes.object.isRequired, acceptComment: PropTypes.func.isRequired, rejectComment: PropTypes.func.isRequired, - data: PropTypes.object.isRequired, selectedCommentIds: PropTypes.array.isRequired, viewUserDetail: PropTypes.any.isRequired, loadMore: PropTypes.any.isRequired, diff --git a/client/coral-admin/src/routes/Configure/components/Configure.js b/client/coral-admin/src/routes/Configure/components/Configure.js index 140222f68..efd428378 100644 --- a/client/coral-admin/src/routes/Configure/components/Configure.js +++ b/client/coral-admin/src/routes/Configure/components/Configure.js @@ -75,7 +75,6 @@ export default class Configure extends Component {
@@ -88,7 +87,6 @@ export default class Configure extends Component { Configure.propTypes = { savePending: PropTypes.func.isRequired, currentUser: PropTypes.object.isRequired, - data: PropTypes.object.isRequired, root: PropTypes.object.isRequired, settings: PropTypes.object.isRequired, canSave: PropTypes.bool.isRequired, diff --git a/client/coral-admin/src/routes/Configure/containers/Configure.js b/client/coral-admin/src/routes/Configure/containers/Configure.js index fe87766b6..ce6ea0627 100644 --- a/client/coral-admin/src/routes/Configure/containers/Configure.js +++ b/client/coral-admin/src/routes/Configure/containers/Configure.js @@ -31,7 +31,6 @@ class ConfigureContainer extends Component { return ( ({ + mapProps(({ root, settings, updatePending, errors, ...rest }) => ({ slotPassthrough: { - data, root, settings, updatePending, diff --git a/client/coral-admin/src/routes/Configure/containers/StreamSettings.js b/client/coral-admin/src/routes/Configure/containers/StreamSettings.js index 314dfa3ab..5bc8e69a9 100644 --- a/client/coral-admin/src/routes/Configure/containers/StreamSettings.js +++ b/client/coral-admin/src/routes/Configure/containers/StreamSettings.js @@ -44,9 +44,8 @@ export default compose( `, }), connect(mapStateToProps, mapDispatchToProps), - mapProps(({ root, settings, data, updatePending, errors, ...rest }) => ({ + mapProps(({ root, settings, updatePending, errors, ...rest }) => ({ slotPassthrough: { - data, root, settings, updatePending, diff --git a/client/coral-admin/src/routes/Configure/containers/TechSettings.js b/client/coral-admin/src/routes/Configure/containers/TechSettings.js index d8a957cbf..7fbe81cdb 100644 --- a/client/coral-admin/src/routes/Configure/containers/TechSettings.js +++ b/client/coral-admin/src/routes/Configure/containers/TechSettings.js @@ -40,9 +40,8 @@ export default compose( `, }), connect(mapStateToProps, mapDispatchToProps), - mapProps(({ root, settings, data, updatePending, errors, ...rest }) => ({ + mapProps(({ root, settings, updatePending, errors, ...rest }) => ({ slotPassthrough: { - data, root, settings, updatePending, diff --git a/client/coral-admin/src/routes/Moderation/components/Comment.js b/client/coral-admin/src/routes/Moderation/components/Comment.js index 8a107ac24..62aaad645 100644 --- a/client/coral-admin/src/routes/Moderation/components/Comment.js +++ b/client/coral-admin/src/routes/Moderation/components/Comment.js @@ -53,7 +53,6 @@ class Comment extends React.Component { comment, selected, className, - data, root, root: { settings }, currentAsset, @@ -70,7 +69,6 @@ class Comment extends React.Component { }; const slotPassthrough = { - data, clearHeightCache, root, comment, @@ -177,7 +175,6 @@ class Comment extends React.Component {
- +
@@ -20,7 +16,6 @@ class Configure extends React.Component { } Configure.propTypes = { - data: PropTypes.object.isRequired, root: PropTypes.object.isRequired, asset: PropTypes.object.isRequired, }; diff --git a/client/coral-embed-stream/src/tabs/configure/containers/Configure.js b/client/coral-embed-stream/src/tabs/configure/containers/Configure.js index b6104b067..1ba86509e 100644 --- a/client/coral-embed-stream/src/tabs/configure/containers/Configure.js +++ b/client/coral-embed-stream/src/tabs/configure/containers/Configure.js @@ -13,13 +13,7 @@ class ConfigureContainer extends React.Component { return
{this.props.data.error.message}
; } - return ( - - ); + return ; } } diff --git a/client/coral-embed-stream/src/tabs/configure/containers/Settings.js b/client/coral-embed-stream/src/tabs/configure/containers/Settings.js index 652550a5d..cfb72c0ae 100644 --- a/client/coral-embed-stream/src/tabs/configure/containers/Settings.js +++ b/client/coral-embed-stream/src/tabs/configure/containers/Settings.js @@ -57,7 +57,6 @@ class SettingsContainer extends React.Component { const { mergedSettings, canSave, - data, root, asset, errors, @@ -68,7 +67,6 @@ class SettingsContainer extends React.Component { root, asset, settings: mergedSettings, - data, updatePending, errors, }; @@ -91,7 +89,6 @@ class SettingsContainer extends React.Component { } SettingsContainer.propTypes = { - data: PropTypes.object.isRequired, root: PropTypes.object.isRequired, asset: PropTypes.object.isRequired, pending: PropTypes.object.isRequired, diff --git a/client/coral-embed-stream/src/tabs/profile/components/Comment.js b/client/coral-embed-stream/src/tabs/profile/components/Comment.js index 668e71702..be13c2c50 100644 --- a/client/coral-embed-stream/src/tabs/profile/components/Comment.js +++ b/client/coral-embed-stream/src/tabs/profile/components/Comment.js @@ -22,9 +22,9 @@ class Comment extends React.Component { }; render() { - const { comment, data, root } = this.props; + const { comment, root } = this.props; const reactionCount = getTotalReactionsCount(comment.action_summaries); - const slotPassthrough = { data, root, comment, asset: comment.asset }; + const slotPassthrough = { root, comment, asset: comment.asset }; return (
@@ -114,7 +114,6 @@ class Comment extends React.Component { Comment.propTypes = { comment: PropTypes.object.isRequired, navigate: PropTypes.func.isRequired, - data: PropTypes.object.isRequired, root: PropTypes.object.isRequired, }; diff --git a/client/coral-embed-stream/src/tabs/profile/components/CommentHistory.js b/client/coral-embed-stream/src/tabs/profile/components/CommentHistory.js index 64d9e97ae..c15314f29 100644 --- a/client/coral-embed-stream/src/tabs/profile/components/CommentHistory.js +++ b/client/coral-embed-stream/src/tabs/profile/components/CommentHistory.js @@ -22,7 +22,7 @@ class CommentHistory extends React.Component { }; render() { - const { navigate, comments, data, root } = this.props; + const { navigate, comments, root } = this.props; if (!comments.nodes.length) { return ; } @@ -33,7 +33,6 @@ class CommentHistory extends React.Component { return ( { +const Profile = ({ username, emailAddress, root, slotPassthrough }) => { return (
@@ -12,7 +12,7 @@ const Profile = ({ username, emailAddress, data, root, slotPassthrough }) => { {emailAddress ?

{emailAddress}

: null}
- +
); }; @@ -20,7 +20,6 @@ const Profile = ({ username, emailAddress, data, root, slotPassthrough }) => { Profile.propTypes = { username: PropTypes.string, emailAddress: PropTypes.string, - data: PropTypes.object, root: PropTypes.object, slotPassthrough: PropTypes.object, }; diff --git a/client/coral-embed-stream/src/tabs/profile/components/Settings.js b/client/coral-embed-stream/src/tabs/profile/components/Settings.js index 1d5a7cc51..c61a09a92 100644 --- a/client/coral-embed-stream/src/tabs/profile/components/Settings.js +++ b/client/coral-embed-stream/src/tabs/profile/components/Settings.js @@ -4,8 +4,8 @@ import { Slot } from 'coral-framework/components'; class Settings extends React.Component { render() { - const { data, root } = this.props; - const slotPassthrough = { data, root }; + const { root } = this.props; + const slotPassthrough = { root }; return (
@@ -15,7 +15,6 @@ class Settings extends React.Component { } Settings.propTypes = { - data: PropTypes.object, root: PropTypes.object, }; diff --git a/client/coral-embed-stream/src/tabs/profile/components/TabPanel.js b/client/coral-embed-stream/src/tabs/profile/components/TabPanel.js index fd236dd3a..08270bcd8 100644 --- a/client/coral-embed-stream/src/tabs/profile/components/TabPanel.js +++ b/client/coral-embed-stream/src/tabs/profile/components/TabPanel.js @@ -7,7 +7,6 @@ import t from 'coral-framework/services/i18n'; import Settings from '../containers/Settings'; const TabPanel = ({ - data, root, activeTab, setActiveTab, @@ -40,10 +39,10 @@ const TabPanel = ({ tabs={tabs} tabPanes={[ - + , - + , ]} sub @@ -52,7 +51,6 @@ const TabPanel = ({ }; TabPanel.propTypes = { - data: PropTypes.object, root: PropTypes.object, slotPassthrough: PropTypes.object, activeTab: PropTypes.string.isRequired, diff --git a/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js b/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js index a02225939..27727216e 100644 --- a/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js +++ b/client/coral-embed-stream/src/tabs/profile/containers/CommentHistory.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { compose, gql } from 'react-apollo'; import CommentHistory from '../components/CommentHistory'; import Comment from './Comment'; -import { withFragments } from 'coral-framework/hocs'; +import { withFragments, withFetchMore } from 'coral-framework/hocs'; import { appendNewNodes } from 'plugin-api/beta/client/utils'; import update from 'immutability-helper'; @@ -16,7 +16,7 @@ class CommentHistoryContainer extends Component { }; loadMore = () => { - return this.props.data.fetchMore({ + return this.props.fetchMore({ query: LOAD_MORE_QUERY, variables: { limit: 5, @@ -43,7 +43,6 @@ class CommentHistoryContainer extends Component { return ( ({ export default compose( connect(mapStateToProps, null), - withCommentHistoryFragments + withCommentHistoryFragments, + withFetchMore )(CommentHistoryContainer); diff --git a/client/coral-embed-stream/src/tabs/profile/containers/Profile.js b/client/coral-embed-stream/src/tabs/profile/containers/Profile.js index 11d514540..30d634d94 100644 --- a/client/coral-embed-stream/src/tabs/profile/containers/Profile.js +++ b/client/coral-embed-stream/src/tabs/profile/containers/Profile.js @@ -22,7 +22,7 @@ class ProfileContainer extends Component { } render() { - const { currentUser, showSignInDialog, root, data } = this.props; + const { currentUser, showSignInDialog, root } = this.props; const { me } = this.props.root; const loading = this.props.data.loading; @@ -40,13 +40,12 @@ class ProfileContainer extends Component { const localProfile = currentUser.profiles.find(p => p.provider === 'local'); const emailAddress = localProfile && localProfile.id; - const slotPassthrough = { data, root }; + const slotPassthrough = { root }; return ( diff --git a/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js b/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js index 0679ad31f..46c24227f 100644 --- a/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js +++ b/client/coral-embed-stream/src/tabs/profile/containers/TabPanel.js @@ -15,7 +15,6 @@ class TabPanelContainer extends Component { render() { return ( { return ( {t('stream.comment_not_found')}; } - const slotPassthrough = { data, root, asset }; + const slotPassthrough = { root, asset }; return (
@@ -318,7 +313,6 @@ class Stream extends React.Component { Stream.propTypes = { asset: PropTypes.object, activeStreamTab: PropTypes.string, - data: PropTypes.object, root: PropTypes.object, activeReplyBox: PropTypes.string, setActiveReplyBox: PropTypes.func, diff --git a/plugins/talk-plugin-viewing-options/client/components/Menu.js b/plugins/talk-plugin-viewing-options/client/components/Menu.js index bb44ce775..c3ea40fe1 100644 --- a/plugins/talk-plugin-viewing-options/client/components/Menu.js +++ b/plugins/talk-plugin-viewing-options/client/components/Menu.js @@ -26,7 +26,7 @@ class Menu extends React.Component { ))}