import { useIntl } from '@umijs/max'; import { Collapse, Flex, Typography } from 'antd'; import { MessageInstance } from 'antd/es/message/interface'; import { GPSParseResult } from '../type'; import { BaseMap } from './BaseMap'; import ShipDetail from './ShipDetail'; const MultipleShips = ({ things, messageApi, mapController, }: { things: SgwModel.SgwThing[]; messageApi: MessageInstance; mapController: BaseMap | null; }) => { const intl = useIntl(); return ( { const gpsData: GPSParseResult = JSON.parse(thing.metadata?.gps || '{}'); return { key: index, label: ( {thing.metadata?.ship_name || thing.name}
${intl.formatMessage({ id: 'map.ship_detail.speed' })}:{' '} {gpsData.s} km/h - {intl.formatMessage({ id: 'map.ship_detail.heading' })}:{' '} {gpsData.h}°
), children: ( ), }; })} >
); }; export default MultipleShips;