import React, { Component } from 'react'; import { Redirect, Switch, RouteComponentProps } from 'react-router-dom' import { Tabs, Tab } from '@material-ui/core'; import { withAuthenticatedContext, AuthenticatedContextProps, AuthenticatedRoute } from '../authentication'; import { MenuAppBar } from '../components'; import SystemStatusController from './SystemStatusController'; import OTASettingsController from './OTASettingsController'; import { WithFeaturesProps, withFeatures } from '../features/FeaturesContext'; type SystemProps = AuthenticatedContextProps & RouteComponentProps & WithFeaturesProps; class System extends Component { handleTabChange = (event: React.ChangeEvent<{}>, path: string) => { this.props.history.push(path); }; render() { const { authenticatedContext, features } = this.props; return ( {features.ota && ( )} {features.ota && ( )} ) } } export default withFeatures(withAuthenticatedContext(System));