lbry-desktop/ui/component/commentReactions/index.js
jessop e954bce821 allow reaction list without channel
uncomment

reacts requireauth, commentReact handles missing channels

enable config, better track pending reacts
2020-10-01 15:23:15 -04:00

20 lines
680 B
JavaScript

import { connect } from 'react-redux';
import Comment from './view';
import {
makeSelectMyReactionsForComment,
makeSelectOthersReactionsForComment,
selectPendingCommentReacts,
} from 'redux/selectors/comments';
import { doCommentReact } from 'redux/actions/comments';
const select = (state, props) => ({
myReacts: makeSelectMyReactionsForComment(props.commentId)(state),
othersReacts: makeSelectOthersReactionsForComment(props.commentId)(state),
pendingCommentReacts: selectPendingCommentReacts(state),
});
const perform = dispatch => ({
react: (commentId, type) => dispatch(doCommentReact(commentId, type)),
});
export default connect(select, perform)(Comment);