2020-08-24 19:35:21 +02:00
|
|
|
import { connect } from 'react-redux';
|
2022-03-02 13:10:52 +01:00
|
|
|
import { selectClaimIsMineForUri } from 'redux/selectors/claims';
|
2022-03-03 15:20:09 +01:00
|
|
|
import { selectIsFetchingCommentsForParentId, selectRepliesForParentId } from 'redux/selectors/comments';
|
2020-08-25 21:54:06 +02:00
|
|
|
import CommentsReplies from './view';
|
2020-08-24 19:35:21 +02:00
|
|
|
|
2021-10-13 22:28:19 +02:00
|
|
|
const select = (state, props) => {
|
2022-03-02 13:10:52 +01:00
|
|
|
const { uri, parentId } = props;
|
2021-10-13 22:28:19 +02:00
|
|
|
|
|
|
|
return {
|
2022-03-02 13:10:52 +01:00
|
|
|
fetchedReplies: selectRepliesForParentId(state, parentId),
|
|
|
|
claimIsMine: selectClaimIsMineForUri(state, uri),
|
2022-03-03 15:20:09 +01:00
|
|
|
isFetching: selectIsFetchingCommentsForParentId(state, parentId),
|
2021-10-13 22:28:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-02 13:10:52 +01:00
|
|
|
export default connect(select)(CommentsReplies);
|