1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/component/feature/view-container.jsx

25 lines
589 B
React
Raw Normal View History

import { connect } from 'react-redux';
import {
fetchFeatureToggles,
2017-01-06 15:21:58 +01:00
toggleFeature,
removeFeatureToggle,
} from '../../store/feature-actions';
import ViewToggleComponent from './view-component';
export default connect(
(state, props) => ({
features: state.features.toJS(),
featureToggle: state.features
.toJS()
.find(toggle => toggle.name === props.featureToggleName),
activeTab: props.activeTab,
}),
{
fetchFeatureToggles,
toggleFeature,
removeFeatureToggle,
}
)(ViewToggleComponent);