9c9530c6f3
This reverts commit fa7f74f979
.
28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
doResolveUri,
|
|
makeSelectClaimIsPending,
|
|
makeSelectClaimForUri,
|
|
makeSelectThumbnailForUri,
|
|
makeSelectIsUriResolving,
|
|
selectChannelIsBlocked,
|
|
doCommentUpdate, // doEditComment would be a more fitting name
|
|
doCommentAbandon,
|
|
} from 'lbry-redux';
|
|
import Comment from './view';
|
|
|
|
const select = (state, props) => ({
|
|
pending: props.authorUri && makeSelectClaimIsPending(props.authorUri)(state),
|
|
channel: props.authorUri && makeSelectClaimForUri(props.authorUri)(state),
|
|
isResolvingUri: props.authorUri && makeSelectIsUriResolving(props.authorUri)(state),
|
|
thumbnail: props.authorUri && makeSelectThumbnailForUri(props.authorUri)(state),
|
|
channelIsBlocked: props.authorUri && selectChannelIsBlocked(props.authorUri)(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
|
updateComment: (commentId, comment) => dispatch(doCommentUpdate(commentId, comment)),
|
|
deleteComment: commentId => dispatch(doCommentAbandon(commentId)),
|
|
});
|
|
|
|
export default connect(select, perform)(Comment);
|