2020-08-24 19:35:21 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { makeSelectClaimIsMine, selectMyChannelClaims } from 'redux/selectors/claims';
|
2021-08-04 17:01:31 +02:00
|
|
|
import { selectIsFetchingCommentsByParentId, makeSelectRepliesForParentId } from 'redux/selectors/comments';
|
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
|
|
|
|
2021-10-11 03:43:29 +02:00
|
|
|
const select = (state, props) => ({
|
|
|
|
fetchedReplies: makeSelectRepliesForParentId(props.parentId)(state),
|
|
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
|
|
|
commentingEnabled: IS_WEB ? Boolean(selectUserVerifiedEmail(state)) : true,
|
|
|
|
myChannels: selectMyChannelClaims(state),
|
|
|
|
isFetchingByParentId: selectIsFetchingCommentsByParentId(state),
|
|
|
|
});
|
2020-08-24 19:35:21 +02:00
|
|
|
|
2021-10-11 03:43:29 +02:00
|
|
|
export default connect(select)(CommentsReplies);
|