Restrict content in the comment stream when banned.

This commit is contained in:
gaba
2016-12-02 08:00:26 -08:00
parent da7f39c9e9
commit 1cda5b9099
5 changed files with 122 additions and 105 deletions
+4 -1
View File
@@ -4,12 +4,15 @@ import translations from './translations.json';
const name = 'coral-plugin-flags';
const FlagButton = ({flag, id, postAction, deleteAction, addItem, updateItem, addNotification, currentUser}) => {
const FlagButton = ({flag, id, postAction, deleteAction, addItem, updateItem, addNotification, currentUser, banned}) => {
const flagged = flag && flag.current_user;
const onFlagClick = () => {
if (!currentUser) {
return;
}
if (banned) {
return;
}
if (!flagged) {
postAction(id, 'flag', currentUser.id, 'comments')
.then((action) => {