mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Selector: getTransactionsById (similar as getListingsById)
This commit is contained in:
parent
04775c80a3
commit
e75fe995f0
1 changed files with 11 additions and 0 deletions
|
|
@ -68,6 +68,17 @@ export const getMarketplaceEntities = (state, entityRefs) => {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the denormalised transaction entities with the given IDs
|
||||
*
|
||||
* @param {Object} state the full Redux store
|
||||
* @param {Array<UUID>} transactionIds transaction IDs to select from the store
|
||||
*/
|
||||
export const getTransactionsById = (state, transactionIds) => {
|
||||
const entityRefs = transactionIds.map(id => ({ id, type: 'transaction' }));
|
||||
return getMarketplaceEntities(state, entityRefs);
|
||||
};
|
||||
|
||||
// ================ Action creators ================ //
|
||||
|
||||
export const addMarketplaceEntities = apiResponse => ({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue