mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
20 lines
659 B
JavaScript
20 lines
659 B
JavaScript
import { connect } from 'react-redux';
|
|
import Comment from './view';
|
|
import {
|
|
makeSelectMyReactionsForComment,
|
|
makeSelectOthersReactionsForComment,
|
|
selectTypesReacting,
|
|
} from 'redux/selectors/comments';
|
|
import { doCommentReact } from 'redux/actions/comments';
|
|
|
|
const select = (state, props) => ({
|
|
myReacts: makeSelectMyReactionsForComment(props.commentId)(state),
|
|
othersReacts: makeSelectOthersReactionsForComment(props.commentId)(state),
|
|
typesReacting: selectTypesReacting(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
react: (commentId, type) => dispatch(doCommentReact(commentId, type)),
|
|
});
|
|
|
|
export default connect(select, perform)(Comment);
|