|
|
@ -1,4 +1,5 @@
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
|
|
|
|
import AlbumAppState from 'App/State/AlbumAppState';
|
|
|
|
import AppState from 'App/State/AppState';
|
|
|
|
import AppState from 'App/State/AppState';
|
|
|
|
import Artist from 'Artist/Artist';
|
|
|
|
import Artist from 'Artist/Artist';
|
|
|
|
import { createArtistSelectorForHook } from './createArtistSelector';
|
|
|
|
import { createArtistSelectorForHook } from './createArtistSelector';
|
|
|
@ -7,7 +8,7 @@ function createArtistAlbumsSelector(artistId: number) {
|
|
|
|
return createSelector(
|
|
|
|
return createSelector(
|
|
|
|
(state: AppState) => state.albums,
|
|
|
|
(state: AppState) => state.albums,
|
|
|
|
createArtistSelectorForHook(artistId),
|
|
|
|
createArtistSelectorForHook(artistId),
|
|
|
|
(albums, artist = {} as Artist) => {
|
|
|
|
(albums: AlbumAppState, artist = {} as Artist) => {
|
|
|
|
const { isFetching, isPopulated, error, items } = albums;
|
|
|
|
const { isFetching, isPopulated, error, items } = albums;
|
|
|
|
|
|
|
|
|
|
|
|
const filteredAlbums = items.filter(
|
|
|
|
const filteredAlbums = items.filter(
|
|
|
|