Refactor isCommentActive logic

This commit is contained in:
Chi Vinh Le
2017-07-31 20:09:16 +07:00
parent 2217c89aa7
commit fc3acecf61
3 changed files with 8 additions and 3 deletions
+4
View File
@@ -187,3 +187,7 @@ export function buildUrl({protocol, hostname, port, pathname, search, hash} = wi
export function getSlotFragmentSpreads(slots, resource) {
return `...${slots.map((s) => `TalkSlot_${capitalize(s)}_${resource}`).join('\n...')}\n`;
}
export function isCommentActive(commentStatus) {
return ['NONE', 'ACCEPTED'].indexOf(commentStatus) >= 0;
}