2020-08-24 19:35:21 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { makeSelectClaimIsMine, selectMyChannelClaims } from 'lbry-redux';
|
|
|
|
import { makeSelectRepliesForParentId } from 'redux/selectors/comments';
|
2020-08-25 21:54:06 +02:00
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2020-08-24 19:35:21 +02:00
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
2020-08-25 21:54:06 +02:00
|
|
|
import CommentsReplies from './view';
|
2020-08-24 19:35:21 +02:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
myChannels: selectMyChannelClaims(state),
|
|
|
|
comments: makeSelectRepliesForParentId(props.parentId)(state),
|
|
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
|
|
|
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
|
|
|
});
|
|
|
|
|
2020-08-25 21:54:06 +02:00
|
|
|
export default connect(select, {
|
|
|
|
doToast,
|
|
|
|
})(CommentsReplies);
|