diff --git a/client/coral-admin/src/containers/Community/FlaggedAccounts.js b/client/coral-admin/src/containers/Community/FlaggedAccounts.js
index 1a6d349c8..692cef70d 100644
--- a/client/coral-admin/src/containers/Community/FlaggedAccounts.js
+++ b/client/coral-admin/src/containers/Community/FlaggedAccounts.js
@@ -7,13 +7,15 @@ const lang = new I18n(translations);
import styles from './Community.css';
import Loading from './Loading';
-import EmptyCard from '../../components/EmptyCard';
+import EmptyCard from 'coral-admin/src/components/EmptyCard';
import User from './components/User';
const FlaggedAccounts = ({...props}) => {
const {commenters, isFetching} = props;
const hasResults = !isFetching && commenters && !!commenters.length;
+// if (commenter.status === 'PENDING' && commenter.actions.length > 0) {
+
return (
@@ -21,19 +23,16 @@ const FlaggedAccounts = ({...props}) => {
{
hasResults
? commenters.map((commenter, index) => {
- if (commenter.status === 'PENDING' && commenter.actions.length > 0) {
- return ;
- }
- return null;
+ return ;
})
: {lang.t('community.no-flagged-accounts')}
}
diff --git a/client/coral-admin/src/graphql/queries/index.js b/client/coral-admin/src/graphql/queries/index.js
index 291ea6bc5..f0e8e5b70 100644
--- a/client/coral-admin/src/graphql/queries/index.js
+++ b/client/coral-admin/src/graphql/queries/index.js
@@ -67,7 +67,15 @@ export const loadMore = (fetchMore) => ({limit, cursor, sort, tab, asset_id}) =>
});
};
-export const modUserFlaggedQuery = graphql(MOD_USER_FLAGGED_QUERY);
+export const modUserFlaggedQuery = graphql(MOD_USER_FLAGGED_QUERY, {
+ options: ({params: {action_type = 'FLAG'}}) => {
+ return {
+ variables: {
+ action_type: action_type
+ }
+ };
+ }
+});
export const modQueueResort = (id, fetchMore) => (sort) => {
return fetchMore({
diff --git a/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql b/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql
index 98f2191eb..c99d94583 100644
--- a/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql
+++ b/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql
@@ -1,5 +1,5 @@
-query Users ($n: ACTION_TYPE) {
- users (query:{action_type: $n}){
+query Users ($action_type: ACTION_TYPE) {
+ users (query:{action_type: $action_type}){
id
username
status