mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 17:51:53 +08:00
Displaying DontAgree actions as flags.
This commit is contained in:
@@ -99,6 +99,7 @@ class Comment extends React.Component {
|
||||
|
||||
const like = getActionSummary('LikeActionSummary', comment);
|
||||
const flag = getActionSummary('FlagActionSummary', comment);
|
||||
const dontagree = getActionSummary('DontAgreeActionSummary', comment);
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -130,7 +131,7 @@ class Comment extends React.Component {
|
||||
<div className="commentActionsRight">
|
||||
<PermalinkButton articleURL={asset.url} commentId={comment.id} />
|
||||
<FlagComment
|
||||
flag={flag}
|
||||
flag={flag && flag.current_user ? flag : dontagree}
|
||||
id={comment.id}
|
||||
author_id={comment.user.id}
|
||||
postFlag={postFlag}
|
||||
|
||||
@@ -76,7 +76,6 @@ class FlagButton extends Component {
|
||||
postDontAgree(action)
|
||||
.then(({data}) => {
|
||||
if (itemType === 'COMMENTS') {
|
||||
console.log('data', data);
|
||||
this.setState({localPost: data.createDontAgree.dontagree.id});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user