Fix selector naming convention
ByUri - returns the storage variable (array or object). ForUri - returns the specific entry in the storage variable.
This commit is contained in:
parent
f245f09d1c
commit
64225d2b80
3 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@ import {
|
|||
selectClaimForUri,
|
||||
selectIsUriResolving,
|
||||
selectGeoRestrictionForUri,
|
||||
selectLatestClaimByUri,
|
||||
selectLatestClaimForUri,
|
||||
} from 'redux/selectors/claims';
|
||||
import { makeSelectStreamingUrlForUri } from 'redux/selectors/file_info';
|
||||
import { doResolveUri, doFetchLatestClaimForChannel } from 'redux/actions/claims';
|
||||
|
@ -51,7 +51,7 @@ const select = (state, props) => {
|
|||
const latestContentClaim =
|
||||
featureParam === PAGES.LIVE_NOW
|
||||
? selectActiveLiveClaimForChannel(state, claimId)
|
||||
: selectLatestClaimByUri(state, canonicalUrl);
|
||||
: selectLatestClaimForUri(state, canonicalUrl);
|
||||
const latestClaimUrl = latestContentClaim && latestContentClaim.canonical_url;
|
||||
if (latestClaimUrl) uri = latestClaimUrl;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
selectClaimIsMine,
|
||||
makeSelectClaimIsPending,
|
||||
selectGeoRestrictionForUri,
|
||||
selectLatestClaimByUri,
|
||||
selectLatestClaimForUri,
|
||||
} from 'redux/selectors/claims';
|
||||
import {
|
||||
makeSelectCollectionForId,
|
||||
|
@ -41,7 +41,7 @@ const select = (state, props) => {
|
|||
const { canonical_url: canonicalUrl, claim_id: claimId } = claim || {};
|
||||
const latestContentClaim = liveContentPath
|
||||
? selectActiveLiveClaimForChannel(state, claimId)
|
||||
: selectLatestClaimByUri(state, canonicalUrl);
|
||||
: selectLatestClaimForUri(state, canonicalUrl);
|
||||
const latestClaimUrl = latestContentClaim && latestContentClaim.canonical_url;
|
||||
|
||||
return {
|
||||
|
|
|
@ -35,7 +35,7 @@ export const selectRepostLoading = (state: State) => selectState(state).repostLo
|
|||
export const selectRepostError = (state: State) => selectState(state).repostError;
|
||||
export const selectLatestByUri = (state: State) => selectState(state).latestByUri;
|
||||
|
||||
export const selectLatestClaimByUri = createSelector(
|
||||
export const selectLatestClaimForUri = createSelector(
|
||||
(state, uri) => uri,
|
||||
selectLatestByUri,
|
||||
(uri, latestByUri) => {
|
||||
|
|
Loading…
Reference in a new issue