mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
postRespect
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user