Make UserDetail work independently

This commit is contained in:
Chi Vinh Le
2017-07-27 21:44:29 +07:00
parent b00435bfe3
commit 57fb77008a
18 changed files with 591 additions and 148 deletions
+9
View File
@@ -0,0 +1,9 @@
export function getCommentType(comment) {
let commentType = '';
if (comment.status === 'PREMOD') {
commentType = 'premod';
} else if (comment.actions && comment.actions.some((a) => a.__typename === 'FlagAction')) {
commentType = 'flagged';
}
return commentType;
}