2017-12-14 03:38:27 +00:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
import { fetchHistory, markAsFailed } from 'Store/Actions/historyActions';
|
2018-01-01 06:05:24 +00:00
|
|
|
import createAlbumSelector from 'Store/Selectors/createAlbumSelector';
|
2020-09-07 01:33:10 +00:00
|
|
|
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
2017-12-14 03:38:27 +00:00
|
|
|
import ArtistHistoryRow from './ArtistHistoryRow';
|
|
|
|
|
|
|
|
function createMapStateToProps() {
|
|
|
|
return createSelector(
|
|
|
|
createArtistSelector(),
|
2018-01-01 06:05:24 +00:00
|
|
|
createAlbumSelector(),
|
2017-12-14 03:38:27 +00:00
|
|
|
(artist, album) => {
|
|
|
|
return {
|
|
|
|
artist,
|
|
|
|
album
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
const mapDispatchToProps = {
|
|
|
|
fetchHistory,
|
|
|
|
markAsFailed
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(createMapStateToProps, mapDispatchToProps)(ArtistHistoryRow);
|