bc68207f40
- selectInsufficientCreditsForUri unused - used util function instead of redux selector for title - only pass needed claim props
28 lines
777 B
JavaScript
28 lines
777 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doFetchSubCount, selectSubCountForUri } from 'lbryinc';
|
|
import { selectClaimForUri } from 'redux/selectors/claims';
|
|
import FileTitleSection from './view';
|
|
import { getClaimTitle } from 'util/claim';
|
|
|
|
const select = (state, props) => {
|
|
const { uri } = props;
|
|
|
|
const claim = selectClaimForUri(state, uri);
|
|
|
|
const { signing_channel: channel } = claim || {};
|
|
const channelUri = channel && channel.canonical_url;
|
|
const channelClaimId = channel && channel.claim_id;
|
|
const title = getClaimTitle(claim);
|
|
|
|
return {
|
|
subCount: channelUri && selectSubCountForUri(state, channelUri),
|
|
channelClaimId,
|
|
title,
|
|
};
|
|
};
|
|
|
|
const perform = {
|
|
doFetchSubCount,
|
|
};
|
|
|
|
export default connect(select, perform)(FileTitleSection);
|