import * as React from "react"; import { connect } from "react-redux"; import { HardwareSettings } from "./components/hardware_settings"; import { FarmbotOsSettings } from "./components/farmbot_os_settings"; import { Page, Col, Row } from "../ui/index"; import { mapStateToProps } from "./state_to_props"; import { Props } from "./interfaces"; import { isFwHardwareValue } from "./components/firmware_hardware_support"; import { maybeOpenPanel } from "./components/maybe_highlight"; export class RawDevices extends React.Component { componentDidMount = () => this.props.dispatch(maybeOpenPanel(this.props.bot.controlPanelState)); render() { if (this.props.auth) { const { value } = this.props.sourceFbosConfig("firmware_hardware"); const firmwareHardware = isFwHardwareValue(value) ? value : undefined; return ; } else { throw new Error("Log in first"); } } } export const Devices = connect(mapStateToProps)(RawDevices);