diff --git a/client/coral-admin/src/components/UserDetail.js b/client/coral-admin/src/components/UserDetail.js index 275503085..4d9ed3cc6 100644 --- a/client/coral-admin/src/components/UserDetail.js +++ b/client/coral-admin/src/components/UserDetail.js @@ -23,6 +23,14 @@ export default class UserDetail extends React.Component { toggleSelect: PropTypes.func.isRequired, bulkAccept: PropTypes.func.isRequired, bulkReject: PropTypes.func.isRequired, + loading: PropTypes.bool.isRequired, + data: PropTypes.shape({ + refetch: PropTypes.func.isRequired, + }), + activeTab: PropTypes.string.isRequired, + selectedCommentIds: PropTypes.array.isRequired, + viewUserDetail: PropTypes.any.isRequired, + loadMore: PropTypes.any.isRequired } rejectThenReload = async (info) => { @@ -116,24 +124,22 @@ export default class UserDetail extends React.Component { - -

- Data represents the last six months of activity -

- {`${selectedCommentIds.length} comments selected`} + {selectedCommentIds.length} comments selected ) } diff --git a/client/coral-admin/src/containers/UserDetail.js b/client/coral-admin/src/containers/UserDetail.js index ffc661150..5d9ef0537 100644 --- a/client/coral-admin/src/containers/UserDetail.js +++ b/client/coral-admin/src/containers/UserDetail.js @@ -152,7 +152,7 @@ export const withUserDetailQuery = withQuery(gql` } ${getSlotFragmentSpreads(slots, 'user')} } - totalComments: commentCount(query: {author_id: $author_id}) + totalComments: commentCount(query: {author_id: $author_id, statuses: []}) rejectedComments: commentCount(query: {author_id: $author_id, statuses: [REJECTED]}) comments: comments(query: { author_id: $author_id, diff --git a/client/coral-admin/src/routes/Community/components/Table.js b/client/coral-admin/src/routes/Community/components/Table.js index 60621080e..28b20b82f 100644 --- a/client/coral-admin/src/routes/Community/components/Table.js +++ b/client/coral-admin/src/routes/Community/components/Table.js @@ -1,8 +1,8 @@ import React from 'react'; -import {SelectField, Option} from 'react-mdl-selectfield'; import styles from '../components/Table.css'; import t from 'coral-framework/services/i18n'; import PropTypes from 'prop-types'; +import {Dropdown, Option} from 'coral-ui'; import cn from 'classnames'; const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onCommenterStatusChange, viewUserDetail}) => ( @@ -13,6 +13,7 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme onHeaderClickHandler({field: header.field})}> {header.title} @@ -30,26 +31,24 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme {row.created_at} - onCommenterStatusChange(row.id, status)}> - - - + onCommenterStatusChange(row.id, status)}> + - onRoleChange(row.id, role)}> - - - - - +