store pendingById #418
2 changed files with 1 additions and 25 deletions
|
@ -209,7 +209,6 @@ export {
|
||||||
makeSelectTotalItemsForChannel,
|
makeSelectTotalItemsForChannel,
|
||||||
makeSelectTotalPagesForChannel,
|
makeSelectTotalPagesForChannel,
|
||||||
makeSelectNsfwCountFromUris,
|
makeSelectNsfwCountFromUris,
|
||||||
// makeSelectNsfwCountForChannel,
|
|
||||||
makeSelectOmittedCountForChannel,
|
makeSelectOmittedCountForChannel,
|
||||||
makeSelectClaimIsNsfw,
|
makeSelectClaimIsNsfw,
|
||||||
makeSelectChannelForClaimUri,
|
makeSelectChannelForClaimUri,
|
||||||
|
@ -217,7 +216,6 @@ export {
|
||||||
makeSelectMyChannelPermUrlForName,
|
makeSelectMyChannelPermUrlForName,
|
||||||
makeSelectClaimIsPending,
|
makeSelectClaimIsPending,
|
||||||
makeSelectReflectingClaimForUri,
|
makeSelectReflectingClaimForUri,
|
||||||
// makeSelectClaimsInChannelForCurrentPageState,
|
|
||||||
makeSelectShortUrlForUri,
|
makeSelectShortUrlForUri,
|
||||||
makeSelectCanonicalUrlForUri,
|
makeSelectCanonicalUrlForUri,
|
||||||
makeSelectPermanentUrlForUri,
|
makeSelectPermanentUrlForUri,
|
||||||
|
|
|
@ -21,7 +21,7 @@ export const selectClaimsById = createSelector(
|
||||||
selectById,
|
selectById,
|
||||||
selectPendingClaimsById,
|
selectPendingClaimsById,
|
||||||
(byId, pendingById) => {
|
(byId, pendingById) => {
|
||||||
return Object.assign(byId, pendingById); // do I need merged?
|
return Object.assign(byId, pendingById); // do I need merged to keep metadata?
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -126,14 +126,12 @@ export const selectReflectingById = createSelector(
|
||||||
state => state.reflectingById
|
state => state.reflectingById
|
||||||
);
|
);
|
||||||
|
|
||||||
// use pendingFirst
|
|
||||||
export const makeSelectClaimForClaimId = (claimId: string) =>
|
export const makeSelectClaimForClaimId = (claimId: string) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
selectClaimsById,
|
selectClaimsById,
|
||||||
byId => byId[claimId]
|
byId => byId[claimId]
|
||||||
);
|
);
|
||||||
|
|
||||||
// use pendingFirst
|
|
||||||
export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true) =>
|
export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
selectClaimIdsByUri,
|
selectClaimIdsByUri,
|
||||||
|
@ -178,7 +176,6 @@ export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// use pendingFirst
|
|
||||||
export const selectMyClaimsRaw = createSelector(
|
export const selectMyClaimsRaw = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
selectClaimsById,
|
selectClaimsById,
|
||||||
|
@ -327,7 +324,6 @@ export const makeSelectFetchingChannelClaims = (uri: string) =>
|
||||||
fetching => fetching && fetching[uri]
|
fetching => fetching && fetching[uri]
|
||||||
);
|
);
|
||||||
|
|
||||||
// use pendingFirst
|
|
||||||
export const makeSelectClaimsInChannelForPage = (uri: string, page?: number) =>
|
export const makeSelectClaimsInChannelForPage = (uri: string, page?: number) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
selectClaimsById,
|
selectClaimsById,
|
||||||
|
@ -364,21 +360,6 @@ export const makeSelectTotalPagesInChannelSearch = (uri: string) =>
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// export const makeSelectClaimsInChannelForCurrentPageState = (uri: string) =>
|
|
||||||
// createSelector(
|
|
||||||
// selectClaimsById,
|
|
||||||
// selectAllClaimsByChannel,
|
|
||||||
// selectCurrentChannelPage,
|
|
||||||
// (byId, allClaims, page) => {
|
|
||||||
// const byChannel = allClaims[uri] || {};
|
|
||||||
// const claimIds = byChannel[page || 1];
|
|
||||||
//
|
|
||||||
// if (!claimIds) return claimIds;
|
|
||||||
//
|
|
||||||
// return claimIds.map(claimId => byId[claimId]);
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
export const makeSelectMetadataForUri = (uri: string) =>
|
export const makeSelectMetadataForUri = (uri: string) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
makeSelectClaimForUri(uri),
|
makeSelectClaimForUri(uri),
|
||||||
|
@ -499,7 +480,6 @@ export const selectFetchingMyClaimsPageError = createSelector(
|
||||||
state => state.fetchingClaimListMinePageError
|
state => state.fetchingClaimListMinePageError
|
||||||
);
|
);
|
||||||
|
|
||||||
// use pendingFirst
|
|
||||||
export const selectMyClaims = createSelector(
|
export const selectMyClaims = createSelector(
|
||||||
selectMyActiveClaims,
|
selectMyActiveClaims,
|
||||||
selectClaimsById,
|
selectClaimsById,
|
||||||
|
@ -571,7 +551,6 @@ export const selectFetchingMyCollections = createSelector(
|
||||||
state => state.fetchingMyCollections
|
state => state.fetchingMyCollections
|
||||||
);
|
);
|
||||||
|
|
||||||
// use pendingFirst
|
|
||||||
export const selectMyChannelClaims = createSelector(
|
export const selectMyChannelClaims = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
selectClaimsById,
|
selectClaimsById,
|
||||||
|
@ -629,7 +608,6 @@ export const selectChannelClaimCounts = createSelector(
|
||||||
state => state.channelClaimCounts || {}
|
state => state.channelClaimCounts || {}
|
||||||
);
|
);
|
||||||
|
|
||||||
// JUST PENDING - change this
|
|
||||||
export const makeSelectPendingClaimForUri = (uri: string) =>
|
export const makeSelectPendingClaimForUri = (uri: string) =>
|
||||||
createSelector(
|
createSelector(
|
||||||
selectPendingClaimsById,
|
selectPendingClaimsById,
|
||||||
|
|
Loading…
Reference in a new issue