mirror of
https://github.com/wassname/talk.git
synced 2026-07-23 13:10:20 +08:00
Hiding after action
This commit is contained in:
@@ -31,8 +31,8 @@ export default class ModerationActions extends React.Component {
|
||||
data={data}
|
||||
/>
|
||||
|
||||
<ApproveCommentAction comment={comment} />
|
||||
<RejectCommentAction comment={comment} />
|
||||
<ApproveCommentAction comment={comment} hideTooltip={hideTooltip} />
|
||||
<RejectCommentAction comment={comment} hideTooltip={hideTooltip} />
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -5,12 +5,14 @@ import ApproveCommentAction from '../components/ApproveCommentAction';
|
||||
class ApproveCommentActionContainer extends React.Component {
|
||||
|
||||
approveComment = () => {
|
||||
const {setCommentStatus, comment} = this.props;
|
||||
const {setCommentStatus, comment, hideTooltip} = this.props;
|
||||
|
||||
setCommentStatus({
|
||||
commentId: comment.id,
|
||||
status: 'ACCEPTED'
|
||||
});
|
||||
|
||||
hideTooltip();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -11,6 +11,8 @@ class RejectCommentActionContainer extends React.Component {
|
||||
commentId: comment.id,
|
||||
status: 'REJECTED'
|
||||
});
|
||||
|
||||
hideTooltip();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user