import * as React from "react"; import { Row, Col } from "../../../ui/index"; import { DeviceSetting } from "../../../constants"; import { ColWidth } from "../farmbot_os_settings"; import { NameRowProps } from "./interfaces"; import { t } from "../../../i18next_wrapper"; import { Highlight } from "../maybe_highlight"; import { edit, save } from "../../../api/crud"; import { DevSettings } from "../../../account/dev/dev_support"; export class NameRow extends React.Component { NameInput = () => this.props.dispatch(edit(this.props.device, { name: e.currentTarget.value }))} onBlur={() => this.props.dispatch(save(this.props.device.uuid))} value={this.props.device.body.name} />; render() { const newFormat = DevSettings.futureFeaturesEnabled(); return {!newFormat && } {newFormat && } ; } }