mirror of https://github.com/Sonarr/Sonarr
27 lines
670 B
JavaScript
27 lines
670 B
JavaScript
|
import { connect } from 'react-redux';
|
||
|
import { createSelector } from 'reselect';
|
||
|
import { removeFromBlacklist } from 'Store/Actions/blacklistActions';
|
||
|
import createSeriesSelector from 'Store/Selectors/createSeriesSelector';
|
||
|
import BlacklistRow from './BlacklistRow';
|
||
|
|
||
|
function createMapStateToProps() {
|
||
|
return createSelector(
|
||
|
createSeriesSelector(),
|
||
|
(series) => {
|
||
|
return {
|
||
|
series
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
|
||
|
function createMapDispatchToProps(dispatch, props) {
|
||
|
return {
|
||
|
onRemovePress() {
|
||
|
dispatch(removeFromBlacklist({ id: props.id }));
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export default connect(createMapStateToProps, createMapDispatchToProps)(BlacklistRow);
|