postRespect

This commit is contained in:
Belen Curcio
2017-03-30 19:17:22 -03:00
parent b7e00f1da4
commit cd08987502
5 changed files with 24 additions and 9 deletions
+6 -5
View File
@@ -4,11 +4,12 @@ import {Icon} from 'coral-ui';
export default (props) => {
const handleClick = () => {
props.actions.clickButton();
// props.postRespect({
// item_id: props.comment.id,
// item_type: 'COMMENTS'
// });
// props.actions.clic kButton();
props.context.postRespect({
item_id: props.context.comment.id,
item_type: 'COMMENTS'
});
};
const {clicked} = props.state.respect;
+12
View File
@@ -8,5 +8,17 @@ module.exports = {
return Action.create({item_id, item_type, action_type: 'RESPECT'});
}
}
},
hooks: {
ActionSummary: {
__resolveType: {
post({action_type}) {
switch (action_type) {
case 'RESPECT':
return 'HappyActionSummary';
}
}
}
}
}
};