Rename Community Query

This commit is contained in:
Chi Vinh Le
2017-09-26 03:31:04 +07:00
parent c5e078f1e1
commit 3db406bf26
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ export default {
mutations: {
SetUserStatus: ({variables: {status, userId}}) => ({
updateQueries: {
TalkAdmin_FlaggedAccounts: (prev) => {
TalkAdmin_Community: (prev) => {
if (status !== 'APPROVED') {
return prev;
}
@@ -19,7 +19,7 @@ export default {
}),
RejectUsername: ({variables: {input: {id: userId}}}) => ({
updateQueries: {
TalkAdmin_FlaggedAccounts: (prev) => {
TalkAdmin_Community: (prev) => {
const updated = update(prev, {
users: {
nodes: {$apply: (nodes) => nodes.filter((node) => node.id !== userId)},
@@ -25,7 +25,7 @@ class CommunityContainer extends Component {
}
render() {
return <Community
return <Community
fetchAccounts={this.props.fetchAccounts}
community={this.props.community}
hideRejectUsernameDialog={this.props.hideRejectUsernameDialog}
@@ -63,7 +63,7 @@ const mapDispatchToProps = (dispatch) =>
}, dispatch);
const withData = withQuery(gql`
query TalkAdmin_FlaggedUsernamesCount {
query TalkAdmin_Community {
flaggedUsernamesCount: userCount(query: {
action_type: FLAG,
statuses: [PENDING]