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:
parent
8d28ba7d21
commit
aaf4243b24
@ -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 (
|
||||||
|
@ -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 ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user