import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, Modal, LabeledList, ProgressBar, Section, NoticeBox } from '../components'; import { Window } from '../layouts'; import { toTitleCase, decodeHtmlEntities } from 'common/string'; export const MechaControlConsole = (props, context) => { const { act, data } = useBackend(context); const { beacons, stored_data } = data; return ( {(stored_data.length && (
act('clear_log')} />}> {stored_data.map((data) => ( ({data.time}) ({data.year}) {decodeHtmlEntities(data.message)} ))}
)) || null} {(beacons.length && beacons.map((beacon) => (
act('shock', { mt: beacon.ref })} /> }> {(beacon.cell && ( )) || No Cell Installed} {beacon.airtank}kPa {beacon.pilot || 'Unoccupied'} {toTitleCase(beacon.location) || 'Unknown'} {beacon.active || 'None'} {(beacon.cargoMax && ( )) || null}
))) || No mecha beacons found.}
); };