2019-05-17 20:21:07 +02:00
|
|
|
import { connect } from 'react-redux';
|
2020-05-25 20:45:43 +02:00
|
|
|
import {
|
|
|
|
makeSelectCommentsForUri,
|
|
|
|
doCommentList,
|
|
|
|
makeSelectClaimIsMine,
|
|
|
|
selectMyChannelClaims,
|
|
|
|
selectIsFetchingComments,
|
|
|
|
} from 'lbry-redux';
|
2019-05-17 20:21:07 +02:00
|
|
|
import CommentsList from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2020-01-30 02:02:21 +01:00
|
|
|
myChannels: selectMyChannelClaims(state),
|
2019-05-17 20:21:07 +02:00
|
|
|
comments: makeSelectCommentsForUri(props.uri)(state),
|
2020-01-30 02:02:21 +01:00
|
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
2020-05-25 20:45:43 +02:00
|
|
|
isFetchingComments: selectIsFetchingComments(state),
|
2019-05-17 20:21:07 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2019-06-27 01:59:27 +02:00
|
|
|
fetchComments: uri => dispatch(doCommentList(uri)),
|
2019-05-17 20:21:07 +02:00
|
|
|
});
|
2019-06-27 01:59:27 +02:00
|
|
|
|
2020-01-30 02:02:21 +01:00
|
|
|
export default connect(select, perform)(CommentsList);
|