import React, { PropTypes } from 'react';
import { Tabs, Tab, ProgressBar } from 'react-mdl';
import { hashHistory, Link } from 'react-router';
import HistoryComponent from '../history/history-list-toggle-container';
import MetricComponent from './metric-container';
import EditFeatureToggle from './form-edit-container.jsx';
const TABS = {
view: 0,
edit: 1,
history: 2,
};
export default class ViewFeatureToggleComponent extends React.Component {
constructor (props) {
super(props);
}
static propTypes () {
return {
activeTab: PropTypes.string.isRequired,
featureToggleName: PropTypes.string.isRequired,
features: PropTypes.array.isRequired,
fetchFeatureToggles: PropTypes.array.isRequired,
featureToggle: PropTypes.object.isRequired,
};
}
componentWillMount () {
if (this.props.features.length === 0) {
this.props.fetchFeatureToggles();
}
}
getTabContent (activeTab) {
const {
featureToggle,
featureToggleName,
} = this.props;
if (TABS[activeTab] === TABS.history) {
return