mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 01:24:02 +08:00
26 lines
671 B
JavaScript
26 lines
671 B
JavaScript
import React from 'react';
|
|
import { compose } from 'react-apollo';
|
|
import RejectCommentAction from '../components/RejectCommentAction';
|
|
import { withSetCommentStatus } from 'plugin-api/beta/client/hocs';
|
|
|
|
class RejectCommentActionContainer extends React.Component {
|
|
rejectComment = async () => {
|
|
const { setCommentStatus, comment, hideMenu } = this.props;
|
|
|
|
await setCommentStatus({
|
|
commentId: comment.id,
|
|
status: 'REJECTED',
|
|
});
|
|
|
|
hideMenu();
|
|
};
|
|
|
|
render() {
|
|
return <RejectCommentAction rejectComment={this.rejectComment} />;
|
|
}
|
|
}
|
|
|
|
const enhance = compose(withSetCommentStatus);
|
|
|
|
export default enhance(RejectCommentActionContainer);
|