Select pending url #369
3 changed files with 18 additions and 4 deletions
5
dist/bundle.es.js
vendored
5
dist/bundle.es.js
vendored
|
@ -2363,6 +2363,10 @@ const makeSelectAmountForUri = uri => reselect.createSelector(makeSelectClaimFor
|
|||
return claim && claim.amount;
|
||||
});
|
||||
|
||||
const makeSelectEffectiveAmountForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
|
||||
return claim && claim.meta && claim.meta.effective_amount;
|
||||
});
|
||||
|
||||
const makeSelectContentTypeForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
|
||||
const source = claim && claim.value && claim.value.source;
|
||||
return source ? source.media_type : undefined;
|
||||
|
@ -6218,6 +6222,7 @@ exports.makeSelectCoverForUri = makeSelectCoverForUri;
|
|||
exports.makeSelectDateForUri = makeSelectDateForUri;
|
||||
exports.makeSelectDownloadPathForUri = makeSelectDownloadPathForUri;
|
||||
exports.makeSelectDownloadingForUri = makeSelectDownloadingForUri;
|
||||
exports.makeSelectEffectiveAmountForUri = makeSelectEffectiveAmountForUri;
|
||||
exports.makeSelectFetchingChannelClaims = makeSelectFetchingChannelClaims;
|
||||
exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
|
||||
exports.makeSelectFileNameForUri = makeSelectFileNameForUri;
|
||||
|
|
|
@ -157,6 +157,7 @@ export {
|
|||
makeSelectTitleForUri,
|
||||
makeSelectDateForUri,
|
||||
makeSelectAmountForUri,
|
||||
makeSelectEffectiveAmountForUri,
|
||||
makeSelectTagsForUri,
|
||||
makeSelectTagInClaimOrChannelForUri,
|
||||
makeSelectContentTypeForUri,
|
||||
|
|
|
@ -258,8 +258,8 @@ export const makeSelectMyPurchasesForPage = (query: ?string, page: number = 1) =
|
|||
const end = Number(page) * Number(PAGE_SIZE);
|
||||
return matchingFileInfos && matchingFileInfos.length
|
||||
? matchingFileInfos
|
||||
.slice(start, end)
|
||||
.map(fileInfo => fileInfo.canonical_url || fileInfo.permanent_url)
|
||||
.slice(start, end)
|
||||
.map(fileInfo => fileInfo.canonical_url || fileInfo.permanent_url)
|
||||
: [];
|
||||
}
|
||||
);
|
||||
|
@ -365,8 +365,8 @@ export const makeSelectDateForUri = (uri: string) =>
|
|||
(claim.value.release_time
|
||||
? claim.value.release_time * 1000
|
||||
: claim.meta && claim.meta.creation_timestamp
|
||||
? claim.meta.creation_timestamp * 1000
|
||||
: null);
|
||||
? claim.meta.creation_timestamp * 1000
|
||||
: null);
|
||||
if (!timestamp) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -383,6 +383,14 @@ export const makeSelectAmountForUri = (uri: string) =>
|
|||
}
|
||||
);
|
||||
|
||||
export const makeSelectEffectiveAmountForUri = (uri: string) =>
|
||||
createSelector(
|
||||
makeSelectClaimForUri(uri),
|
||||
claim => {
|
||||
return claim && claim.meta && claim.meta.effective_amount;
|
||||
}
|
||||
);
|
||||
|
||||
export const makeSelectContentTypeForUri = (uri: string) =>
|
||||
createSelector(
|
||||
makeSelectClaimForUri(uri),
|
||||
|
|
Loading…
Reference in a new issue