/* @flow */ 'use strict'; import React, { Component } from 'react'; export default class Devices extends Component { render() { const { devices, selectedDevice } = this.props.connect; const deviceList: Array = devices.map((dev, index) => { let css: string = ""; if (dev.unacquired) { css += "unacquired"; } if (dev.isUsedElsewhere) { css += " used-elsewhere"; } if (dev.featuresNeedsReload) { css += " reload-features"; } if (dev.path === selectedDevice) { css += " active"; } return (
  • this.props.onSelectDevice(dev.path) } >{ dev.label }
  • ); }); if (deviceList.length === 0) { deviceList.push( (
  • No connected devices
  • ) ); } return ( ); } }