You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
424 B
15 lines
424 B
import { createSelector } from 'reselect';
|
|
import AppState from 'App/State/AppState';
|
|
|
|
function createMultiArtistsSelector(artistIds: number[]) {
|
|
return createSelector(
|
|
(state: AppState) => state.artist.itemMap,
|
|
(state: AppState) => state.artist.items,
|
|
(itemMap, allArtists) => {
|
|
return artistIds.map((artistId) => allArtists[itemMap[artistId]]);
|
|
}
|
|
);
|
|
}
|
|
|
|
export default createMultiArtistsSelector;
|