Fixed: Faster artist endpoint (#874)

* Fixed: Speed up AllArtist API endpoint

* New: Display UI before artists have loaded

* Add test of new repository methods
This commit is contained in:
ta264 2019-08-17 08:04:59 +01:00 committed by GitHub
parent 698d5e1cf5
commit 0352f8d3ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 158 additions and 31 deletions

View file

@ -4,8 +4,12 @@ import createAllArtistSelector from './createAllArtistSelector';
function createArtistCountSelector() {
return createSelector(
createAllArtistSelector(),
(artists) => {
return artists.length;
(state) => state.artist.error,
(artists, error) => {
return {
count: artists.length,
error
};
}
);
}