More proptypes

This commit is contained in:
Belen Curcio
2017-09-19 13:24:36 -03:00
parent a5350c44ae
commit b9086244e2
2 changed files with 19 additions and 2 deletions
@@ -77,7 +77,10 @@ export default class Community extends Component {
return (
<div>
<FlaggedAccounts {...this.props} />
<FlaggedAccounts
data={this.props.data}
root={this.props.root}
/>
<RejectUsernameDialog
open={community.rejectUsernameDialog}
handleClose={props.hideRejectUsernameDialog}
@@ -4,6 +4,7 @@ import {bindActionCreators} from 'redux';
import {compose, gql} from 'react-apollo';
import {withFragments} from 'plugin-api/beta/client/hocs';
import {Spinner} from 'coral-ui';
import PropTypes from 'prop-types';
import {withSetUserStatus} from 'coral-framework/graphql/mutations';
import {showBanUserDialog} from 'actions/banUserDialog';
@@ -24,7 +25,10 @@ class FlaggedAccountsContainer extends Component {
}
approveUser = ({userId}) => {
return this.props.setUserStatus({userId, status: 'APPROVED'});
return this.props.setUserStatus({
userId,
status: 'APPROVED'
});
}
loadMore = () => {
@@ -74,6 +78,16 @@ class FlaggedAccountsContainer extends Component {
}
}
FlaggedAccountsContainer.propTypes = {
showBanUserDialog: PropTypes.func,
showSuspendUserDialog: PropTypes.func,
showRejectUsernameDialog: PropTypes.func,
viewUserDetail: PropTypes.func,
setUserStatus: PropTypes.func,
data: PropTypes.object,
root: PropTypes.object
};
const LOAD_MORE_QUERY = gql`
query TalkAdmin_LoadMoreFlaggedAccounts($limit: Int, $cursor: Cursor) {
users(query:{action_type: FLAG, statuses: [PENDING], limit: $limit, cursor: $cursor}){