Fix a bug with pagination in Albums page

This commit is contained in:
Lucas Verney 2016-08-12 16:29:13 +02:00
parent 14e7fdceea
commit 92f909a668
7 changed files with 33 additions and 33 deletions

View File

@ -39,7 +39,7 @@ class AlbumsPageIntl extends Component {
// Unload data on page change
this.props.actions.clearPaginatedResults();
// Load new data
this.props.actions.loadAlbums({pageNumber: nextPage});
this.props.actions.loadPaginatedAlbums({pageNumber: nextPage});
}
}
@ -73,7 +73,7 @@ const mapStateToProps = (state) => {
id => state.entities.getIn(["entities", "album", id])
);
albumsList.forEach(function (album) {
const albumArtist = album.get("artist");
const albumArtist = album.get("artist"); // TODO: get on undefined
artistsList = artistsList.set(albumArtist, state.entities.getIn(["entities", "artist", albumArtist]));
});
}

View File

@ -71,7 +71,7 @@ const mapStateToProps = (state) => {
songsList = state.paginated.result.map(function (id) {
let song = state.entities.getIn(["entities", "song", id]);
// Add artist and album infos to song
const artist = state.entities.getIn(["entities", "artist", song.get("artist")]);
const artist = state.entities.getIn(["entities", "artist", song.get("artist")]); // TODO: get on undefined
const album = state.entities.getIn(["entities", "album", song.get("album")]);
return (
song

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long