2019-06-09 08:57:51 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-06-13 06:18:35 +02:00
|
|
|
import { THEME } from 'constants/settings';
|
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2019-06-09 08:57:51 +02:00
|
|
|
|
|
|
|
import {
|
|
|
|
doResolveUri,
|
|
|
|
makeSelectClaimIsMine,
|
|
|
|
makeSelectTitleForUri,
|
|
|
|
makeSelectThumbnailForUri,
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectIsUriResolving,
|
|
|
|
makeSelectMetadataItemForUri,
|
|
|
|
} from 'lbry-redux';
|
|
|
|
|
|
|
|
import { selectBlackListedOutpoints } from 'lbryinc';
|
|
|
|
|
|
|
|
import ClaimLink from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => {
|
|
|
|
return {
|
|
|
|
uri: props.uri,
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
title: makeSelectTitleForUri(props.uri)(state),
|
|
|
|
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
|
|
|
description: makeSelectMetadataItemForUri(props.uri, 'description')(state),
|
2019-06-13 06:18:35 +02:00
|
|
|
currentTheme: makeSelectClientSetting(THEME)(state),
|
2019-06-09 08:57:51 +02:00
|
|
|
channelIsMine: makeSelectClaimIsMine(props.uri)(state),
|
|
|
|
isResolvingUri: makeSelectIsUriResolving(props.uri)(state),
|
|
|
|
blackListedOutpoints: selectBlackListedOutpoints(state),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(ClaimLink);
|