selectClaimIdIsPending #417
3 changed files with 19 additions and 6 deletions
7
dist/bundle.es.js
vendored
7
dist/bundle.es.js
vendored
|
@ -2418,6 +2418,10 @@ const makeSelectClaimIsPending = uri => reselect.createSelector(selectClaimIdsBy
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const makeSelectClaimIdIsPending = claimId => reselect.createSelector(selectPendingIds, pendingIds => {
|
||||||
|
return pendingIds.some(i => i === claimId);
|
||||||
|
});
|
||||||
|
|
||||||
const makeSelectClaimIdForUri = uri => reselect.createSelector(selectClaimIdsByUri, claimIds => claimIds[uri]);
|
const makeSelectClaimIdForUri = uri => reselect.createSelector(selectClaimIdsByUri, claimIds => claimIds[uri]);
|
||||||
|
|
||||||
const selectReflectingById = reselect.createSelector(selectState$1, state => state.reflectingById);
|
const selectReflectingById = reselect.createSelector(selectState$1, state => state.reflectingById);
|
||||||
|
@ -2632,7 +2636,7 @@ const selectMyClaims = reselect.createSelector(selectMyActiveClaims, selectClaim
|
||||||
return [...claims];
|
return [...claims];
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectMyClaimsWithoutChannels = reselect.createSelector(selectMyClaims, myClaims => myClaims.filter(claim => !claim.name.match(/^@/)).sort((a, b) => a.timestamp - b.timestamp));
|
const selectMyClaimsWithoutChannels = reselect.createSelector(selectMyClaims, myClaims => myClaims.filter(claim => claim && !claim.name.match(/^@/)).sort((a, b) => a.timestamp - b.timestamp));
|
||||||
|
|
||||||
const selectMyClaimUrisWithoutChannels = reselect.createSelector(selectMyClaimsWithoutChannels, myClaims => {
|
const selectMyClaimUrisWithoutChannels = reselect.createSelector(selectMyClaimsWithoutChannels, myClaims => {
|
||||||
return myClaims.sort((a, b) => {
|
return myClaims.sort((a, b) => {
|
||||||
|
@ -7927,6 +7931,7 @@ exports.makeSelectClaimForClaimId = makeSelectClaimForClaimId;
|
||||||
exports.makeSelectClaimForUri = makeSelectClaimForUri;
|
exports.makeSelectClaimForUri = makeSelectClaimForUri;
|
||||||
exports.makeSelectClaimHasSource = makeSelectClaimHasSource;
|
exports.makeSelectClaimHasSource = makeSelectClaimHasSource;
|
||||||
exports.makeSelectClaimIdForUri = makeSelectClaimIdForUri;
|
exports.makeSelectClaimIdForUri = makeSelectClaimIdForUri;
|
||||||
|
exports.makeSelectClaimIdIsPending = makeSelectClaimIdIsPending;
|
||||||
exports.makeSelectClaimIdsForCollectionId = makeSelectClaimIdsForCollectionId;
|
exports.makeSelectClaimIdsForCollectionId = makeSelectClaimIdsForCollectionId;
|
||||||
exports.makeSelectClaimIsMine = makeSelectClaimIsMine;
|
exports.makeSelectClaimIsMine = makeSelectClaimIsMine;
|
||||||
exports.makeSelectClaimIsNsfw = makeSelectClaimIsNsfw;
|
exports.makeSelectClaimIsNsfw = makeSelectClaimIsNsfw;
|
||||||
|
|
|
@ -282,6 +282,7 @@ export {
|
||||||
selectUpdateCollectionError,
|
selectUpdateCollectionError,
|
||||||
selectCreatingCollection,
|
selectCreatingCollection,
|
||||||
selectCreateCollectionError,
|
selectCreateCollectionError,
|
||||||
|
makeSelectClaimIdIsPending,
|
||||||
} from 'redux/selectors/claims';
|
} from 'redux/selectors/claims';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
|
@ -95,6 +95,13 @@ export const makeSelectClaimIsPending = (uri: string) =>
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const makeSelectClaimIdIsPending = (claimId: string) => createSelector(
|
||||||
|
selectPendingIds,
|
||||||
|
(pendingIds) => {
|
||||||
|
return pendingIds.some(i => i === claimId);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export const makeSelectClaimIdForUri = (uri: string) =>
|
export const makeSelectClaimIdForUri = (uri: string) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
selectClaimIdsByUri,
|
selectClaimIdsByUri,
|
||||||
|
@ -493,7 +500,7 @@ export const selectMyClaims = createSelector(
|
||||||
export const selectMyClaimsWithoutChannels = createSelector(
|
export const selectMyClaimsWithoutChannels = createSelector(
|
||||||
selectMyClaims,
|
selectMyClaims,
|
||||||
myClaims =>
|
myClaims =>
|
||||||
myClaims.filter(claim => !claim.name.match(/^@/)).sort((a, b) => a.timestamp - b.timestamp)
|
myClaims.filter(claim => claim && !claim.name.match(/^@/)).sort((a, b) => a.timestamp - b.timestamp)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectMyClaimUrisWithoutChannels = createSelector(
|
export const selectMyClaimUrisWithoutChannels = createSelector(
|
||||||
|
|
Loading…
Reference in a new issue