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
665 B
27 lines
665 B
6 years ago
|
import { connect } from 'react-redux';
|
||
|
import { createSelector } from 'reselect';
|
||
|
import { removeFromBlacklist } from 'Store/Actions/blacklistActions';
|
||
|
import createMovieSelector from 'Store/Selectors/createMovieSelector';
|
||
|
import BlacklistRow from './BlacklistRow';
|
||
|
|
||
|
function createMapStateToProps() {
|
||
|
return createSelector(
|
||
|
createMovieSelector(),
|
||
|
(movie) => {
|
||
|
return {
|
||
|
movie
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
|
||
|
function createMapDispatchToProps(dispatch, props) {
|
||
|
return {
|
||
|
onRemovePress() {
|
||
|
dispatch(removeFromBlacklist({ id: props.id }));
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export default connect(createMapStateToProps, createMapDispatchToProps)(BlacklistRow);
|