mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
dbed06f300
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com> Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Christopher Kolstad <git@chriswk.no>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
fetchFeatureToggles,
|
|
fetchFeatureToggle,
|
|
toggleFeature,
|
|
setStale,
|
|
removeFeatureToggle,
|
|
editFeatureToggle,
|
|
} from '../../../store/feature-toggle/actions';
|
|
|
|
import FeatureView from './FeatureView';
|
|
import { hasPermission } from '../../../permissions';
|
|
import { fetchTags, tagFeature, untagFeature } from '../../../store/feature-tags/actions';
|
|
|
|
export default connect(
|
|
(state, props) => ({
|
|
features: state.features.toJS(),
|
|
featureToggle: state.features.toJS().find(toggle => toggle.name === props.featureToggleName),
|
|
featureTags: state.featureTags.toJS(),
|
|
tagTypes: state.tagTypes.toJS(),
|
|
activeTab: props.activeTab,
|
|
hasPermission: hasPermission.bind(null, state.user.get('profile')),
|
|
}),
|
|
{
|
|
fetchFeatureToggles,
|
|
fetchFeatureToggle,
|
|
toggleFeature,
|
|
setStale,
|
|
removeFeatureToggle,
|
|
editFeatureToggle,
|
|
tagFeature,
|
|
untagFeature,
|
|
fetchTags,
|
|
}
|
|
)(FeatureView);
|