lbry-desktop/ui/component/commentsList/index.js

22 lines
625 B
JavaScript

import { connect } from 'react-redux';
import {
makeSelectCommentsForUri,
doCommentList,
makeSelectClaimIsMine,
selectMyChannelClaims,
selectIsFetchingComments,
} from 'lbry-redux';
import CommentsList from './view';
const select = (state, props) => ({
myChannels: selectMyChannelClaims(state),
comments: makeSelectCommentsForUri(props.uri)(state),
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
isFetchingComments: selectIsFetchingComments(state),
});
const perform = dispatch => ({
fetchComments: uri => dispatch(doCommentList(uri)),
});
export default connect(select, perform)(CommentsList);