mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
22 lines
456 B
JavaScript
22 lines
456 B
JavaScript
import { connect } from 'react-redux';
|
|
import { toggleFeature } from '../../action';
|
|
import FeatureList from './FeatureList';
|
|
|
|
const mapStateToProps = (state) => ({
|
|
features: state.features,
|
|
});
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
onFeatureClick: (id) => {
|
|
dispatch(toggleFeature(id));
|
|
},
|
|
});
|
|
|
|
|
|
const FeatureListContainer = connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(FeatureList);
|
|
|
|
export default FeatureListContainer;
|