diff --git a/packages/unleash-frontend-next/src/component/feature/EditFeatureToggle.jsx b/packages/unleash-frontend-next/src/component/feature/EditFeatureToggle.jsx index da4f65be3d..e329362db5 100644 --- a/packages/unleash-frontend-next/src/component/feature/EditFeatureToggle.jsx +++ b/packages/unleash-frontend-next/src/component/feature/EditFeatureToggle.jsx @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; -import { updateFeatureToggle } from '../../store/feature-actions'; +import { editFeatureToggle } from '../../store/feature-actions'; import AddFeatureToggleUI from './AddFeatureToggleUI'; const mapStateToProps = (state, ownProps) => ({ @@ -34,7 +34,7 @@ class AddFeatureToggle extends React.Component { onSubmit = (evt) => { evt.preventDefault(); - this.props.dispatch(updateFeatureToggle(this.state)); + this.props.dispatch(editFeatureToggle(this.state)); this.context.router.push('/features'); }; diff --git a/packages/unleash-frontend-next/src/store/feature-actions.js b/packages/unleash-frontend-next/src/store/feature-actions.js index 5b0361a52f..6a4777d3b2 100644 --- a/packages/unleash-frontend-next/src/store/feature-actions.js +++ b/packages/unleash-frontend-next/src/store/feature-actions.js @@ -50,6 +50,12 @@ export function toggleFeature (featureToggle) { }; }; +export function editFeatureToggle (featureToggle) { + debug('Update feature toggle ', featureToggle); + return dispatch => { + dispatch(requestUpdateFeatureToggle(featureToggle)); + }; +}; function requestFeatureToggles () { return {