lbry-desktop/ui/component/comment/index.js

29 lines
848 B
JavaScript
Raw Normal View History

2019-06-27 01:59:27 +02:00
import { connect } from 'react-redux';
2019-10-23 09:04:40 +02:00
import {
doResolveUri,
makeSelectClaimIsPending,
makeSelectClaimForUri,
makeSelectThumbnailForUri,
makeSelectIsUriResolving,
selectChannelIsBlocked,
} from 'lbry-redux';
2019-06-27 01:59:27 +02:00
import Comment from './view';
2019-10-23 09:04:40 +02:00
const select = (state, props) => ({
pending: props.authorUri && makeSelectClaimIsPending(props.authorUri)(state),
claim: 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)),
});
2019-06-27 01:59:27 +02:00
export default connect(
2019-10-23 09:04:40 +02:00
select,
perform
2019-06-27 01:59:27 +02:00
)(Comment);