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.
18 lines
517 B
18 lines
517 B
10 months ago
|
import { some } from 'lodash';
|
||
7 years ago
|
import { createSelector } from 'reselect';
|
||
10 months ago
|
import AppState from 'App/State/AppState';
|
||
7 years ago
|
import createAllArtistSelector from './createAllArtistSelector';
|
||
7 years ago
|
|
||
|
function createExistingArtistSelector() {
|
||
|
return createSelector(
|
||
10 months ago
|
(_: AppState, { foreignArtistId }: { foreignArtistId: string }) =>
|
||
|
foreignArtistId,
|
||
7 years ago
|
createAllArtistSelector(),
|
||
7 years ago
|
(foreignArtistId, artist) => {
|
||
10 months ago
|
return some(artist, { foreignArtistId });
|
||
7 years ago
|
}
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default createExistingArtistSelector;
|