You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
670 B
27 lines
670 B
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);
|