Fix some queries

This commit is contained in:
Chi Vinh Le
2017-06-16 00:43:48 +07:00
parent 5a2ce0f6a7
commit 93c8b115f5
4 changed files with 6 additions and 14 deletions
@@ -26,7 +26,7 @@ const BanUserDialog = ({open, handleClose, handleBanUser, rejectComment, user, c
<h2>{t('bandialog.ban_user')}</h2>
</div>
<div className={styles.separator}>
<h3>{t('bandialog.are_you_sure', user.name)}</h3>
<h3>{t('bandialog.are_you_sure', user.username)}</h3>
<i>{showRejectedNote && t('bandialog.note')}</i>
</div>
<div className={styles.buttons}>
@@ -76,7 +76,7 @@ class Comment extends React.Component {
{
!minimal && (
<span className={styles.username} onClick={() => viewUserDetail(comment.user.id)}>
{comment.user.name}
{comment.user.username}
</span>
)
}
@@ -102,7 +102,7 @@ class Comment extends React.Component {
<ActionsMenu icon="not_interested">
<ActionsMenuItem
disabled={comment.user.status === 'BANNED'}
onClick={() => props.showSuspendUserDialog(comment.user.id, comment.user.name, comment.id, comment.status)}>
onClick={() => props.showSuspendUserDialog(comment.user.id, comment.user.username, comment.id, comment.status)}>
Suspend User</ActionsMenuItem>
<ActionsMenuItem
disabled={comment.user.status === 'BANNED'}
@@ -26,7 +26,7 @@ export default withFragments({
status
user {
id
name: username
username
status
}
asset {
@@ -209,18 +209,10 @@ class ModerationContainer extends Component {
const COMMENTS_EDITED_SUBSCRIPTION = gql`
subscription CommentEdited($asset_id: ID){
commentEdited(asset_id: $asset_id){
id
body
status
editing {
edited
}
user {
id
username
}
...${getDefinitionName(Comment.fragments.comment)}
}
}
${Comment.fragments.comment}
`;
const STATUS_CHANGED_SUBSCRIPTION = gql`