2017-09-04 02:20:56 +00:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { createSelector } from 'reselect';
|
2018-08-08 00:57:15 +00:00
|
|
|
import { removeFromBlacklist } from 'Store/Actions/blacklistActions';
|
2020-09-07 01:33:10 +00:00
|
|
|
import createArtistSelector from 'Store/Selectors/createArtistSelector';
|
2017-09-04 02:20:56 +00:00
|
|
|
import BlacklistRow from './BlacklistRow';
|
|
|
|
|
|
|
|
function createMapStateToProps() {
|
|
|
|
return createSelector(
|
|
|
|
createArtistSelector(),
|
2017-10-07 22:38:31 +00:00
|
|
|
(artist) => {
|
2017-09-04 02:20:56 +00:00
|
|
|
return {
|
2017-10-07 22:38:31 +00:00
|
|
|
artist
|
2017-09-04 02:20:56 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-08-08 00:57:15 +00:00
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
|
|
return {
|
|
|
|
onRemovePress() {
|
|
|
|
dispatch(removeFromBlacklist({ id: props.id }));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(createMapStateToProps, createMapDispatchToProps)(BlacklistRow);
|