diff --git a/ui/component/fileTitleSection/index.js b/ui/component/fileTitleSection/index.js index 7068ef02c..5fe1ed5fd 100644 --- a/ui/component/fileTitleSection/index.js +++ b/ui/component/fileTitleSection/index.js @@ -1,13 +1,13 @@ import { connect } from 'react-redux'; import { doFetchSubCount, selectSubCountForUri } from 'lbryinc'; -import { selectTitleForUri, makeSelectClaimForUri } from 'redux/selectors/claims'; +import { selectTitleForUri, selectClaimForUri } from 'redux/selectors/claims'; import { makeSelectInsufficientCreditsForUri } from 'redux/selectors/content'; -import { makeSelectViewersForId } from 'redux/selectors/livestream'; +import { selectViewersForId } from 'redux/selectors/livestream'; import FileTitleSection from './view'; const select = (state, props) => { - const claim = makeSelectClaimForUri(props.uri)(state); - const viewers = claim && makeSelectViewersForId(claim.claim_id)(state); + const claim = selectClaimForUri(state, props.uri); + const viewers = claim && selectViewersForId(state, claim.claim_id); const channelClaimId = claim && claim.signing_channel ? claim.signing_channel.claim_id : undefined; const channelUri = claim && claim.signing_channel ? claim.signing_channel.canonical_url : undefined; const subCount = channelUri && selectSubCountForUri(state, channelUri); diff --git a/ui/redux/selectors/livestream.js b/ui/redux/selectors/livestream.js index c5a55540a..ec963bde1 100644 --- a/ui/redux/selectors/livestream.js +++ b/ui/redux/selectors/livestream.js @@ -29,8 +29,10 @@ export const selectViewersById = (state: State) => selectState(state).viewersByI export const makeSelectIsFetchingLivestreams = (channelId: string) => createSelector(selectFetchingLivestreams, (fetchingLivestreams) => Boolean(fetchingLivestreams[channelId])); -export const makeSelectViewersForId = (channelId: string) => - createSelector(selectViewersById, (viewers) => viewers[channelId]); +export const selectViewersForId = (state: State, channelId: string) => { + const viewers = selectViewersById(state); + return viewers[channelId]; +}; export const makeSelectPendingLivestreamsForChannelId = (channelId: string) => createSelector(selectPendingClaims, (pendingClaims) => {