mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
89319f9833
(cherry picked from commit ead1371846b1f19cd49928052be0128bf7ccd41f)
27 lines
670 B
JavaScript
27 lines
670 B
JavaScript
import { connect } from 'react-redux';
|
|
import { createSelector } from 'reselect';
|
|
import { removeBlocklistItem } from 'Store/Actions/blocklistActions';
|
|
import createAuthorSelector from 'Store/Selectors/createAuthorSelector';
|
|
import BlocklistRow from './BlocklistRow';
|
|
|
|
function createMapStateToProps() {
|
|
return createSelector(
|
|
createAuthorSelector(),
|
|
(author) => {
|
|
return {
|
|
author
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
return {
|
|
onRemovePress() {
|
|
dispatch(removeBlocklistItem({ id: props.id }));
|
|
}
|
|
};
|
|
}
|
|
|
|
export default connect(createMapStateToProps, createMapDispatchToProps)(BlocklistRow);
|