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