SMall changes for PR.

This commit is contained in:
gaba
2016-12-08 18:29:15 -10:00
parent ecd3f5c347
commit 71d6b90993
4 changed files with 4 additions and 8 deletions
@@ -9,10 +9,8 @@ import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../translations';
const lang = new I18n(translations);
const BanUserDialog = ({open, handleClose, onClickBanUser, user}) => {
const userName = (typeof user === 'undefined') ? '' : user['userName'];
const userId = (typeof user === 'undefined') ? '' : user['userId'];
const commentId = (typeof user === 'undefined') ? '' : user['commentId'];
const BanUserDialog = ({open, handleClose, onClickBanUser, user = {}}) => {
const {userName = '', userId = '', commentId = ''} = user;
return (
<Dialog className={styles.dialog} open={open} onClose={() => handleClose()} onCancel={() => handleClose()} title={lang.t('bandialog.ban_user')}>
@@ -50,8 +50,6 @@ export default props => {
);
};
//return props.author.get('status') === 'banned' ? 'disabled' : 'raised';
// Get the button of the action performed over a comment if any
const getActionButton = (action, i, props) => {
const status = props.comment.get('status');
+1 -1
View File
@@ -2,7 +2,7 @@ import {Map, List, fromJS} from 'immutable';
const initialState = Map({
byId: Map(),
ids: List(),
ids: List()
});
export default (state = initialState, action) => {
+1 -1
View File
@@ -51,7 +51,7 @@ router.post('/:user_id/status', (req, res, next) => {
User
.setStatus(req.params.user_id, req.body.status, req.body.comment_id)
.then(status => {
res.send(status);
res.json(status);
})
.catch(next);
});