mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
postRespect
This commit is contained in:
@@ -148,8 +148,6 @@ class Comment extends React.Component {
|
||||
...rest
|
||||
};
|
||||
|
||||
console.log('Commnet --------', pluginProps)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={commentClass}
|
||||
|
||||
@@ -135,7 +135,7 @@ class Embed extends Component {
|
||||
return (
|
||||
<div style={expandForLogin}>
|
||||
<div className="commentStream">
|
||||
{/*<Slot fill="Stream" pluginProps={pluginProps} />*/}
|
||||
{/* <Slot fill="Stream" pluginProps={pluginProps} />*/}
|
||||
<TabBar onChange={this.changeTab} activeTab={activeTab}>
|
||||
<Tab><Count count={asset.totalCommentCount}/></Tab>
|
||||
<Tab>{lang.t('MY_COMMENTS')}</Tab>
|
||||
@@ -282,7 +282,7 @@ const mapStateToProps = (state) => Object
|
||||
userData: state.user.toJS(),
|
||||
asset: state.asset.toJS(),
|
||||
state: {}
|
||||
});
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
requestConfirmEmail: () => dispatch(requestConfirmEmail()),
|
||||
|
||||
@@ -67,6 +67,10 @@ function injectPlugins ({fill, ...props}) {
|
||||
.map(addProps)
|
||||
.filter(filterBySlot)
|
||||
.reduce((entry, plugin, i) => {
|
||||
// const element = React.cloneElement(
|
||||
// context(plugin.key),
|
||||
// {...plugin.props, key: i}
|
||||
// );
|
||||
entry = [...entry, context(plugin.key)({...plugin.props, key: i})];
|
||||
return entry;
|
||||
}, []);
|
||||
|
||||
@@ -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