1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-15 01:16:22 +02:00

clean(feature-form): remove unused code

This commit is contained in:
Corinne Krych 2018-03-20 18:53:59 +01:00
parent 8d28ba7d21
commit aaf4243b24
2 changed files with 8 additions and 30 deletions

View File

@ -4,20 +4,8 @@ import StrategiesSection from './strategies-section-container';
import { Button, Icon } from 'react-mdl'; import { Button, Icon } from 'react-mdl';
class ViewFeatureComponent extends Component { class ViewFeatureComponent extends Component {
// static displayName = `UpdateFeatureComponent-{getDisplayName(Component)}`;
componentWillMount() {
// TODO unwind this stuff
if (this.props.initCallRequired === true) {
this.props.init(this.props.input);
}
}
render() { render() {
const { input, onCancel } = this.props; const { input, onCancel } = this.props;
const {
name, // eslint-disable-line
} = input;
const configuredStrategies = input.strategies || []; const configuredStrategies = input.strategies || [];
return ( return (

View File

@ -164,24 +164,14 @@ export default class ViewFeatureToggleComponent extends React.Component {
}} }}
> >
<span style={{ paddingRight: '24px' }}> <span style={{ paddingRight: '24px' }}>
{this.isFeatureView ? ( <Switch
<Switch disabled={this.isFeatureView}
ripple ripple
checked={featureToggle.enabled} checked={featureToggle.enabled}
onChange={() => toggleFeature(featureToggle.name)} onChange={() => toggleFeature(featureToggle.name)}
> >
{featureToggle.enabled ? 'Enabled' : 'Disabled'} {featureToggle.enabled ? 'Enabled' : 'Disabled'}
</Switch> </Switch>
) : (
<Switch
disabled
ripple
checked={featureToggle.enabled}
onChange={() => toggleFeature(featureToggle.name)}
>
{featureToggle.enabled ? 'Enabled' : 'Disabled'}
</Switch>
)}
</span> </span>
{this.isFeatureView ? ( {this.isFeatureView ? (