import * as React from 'react'; import {ILocation, INominatimItem} from '../../interfaces'; import {superdeskApi} from '../../superdeskApi'; import {ToggleBox} from '../UI'; import {Label} from '../UI/Form'; import {PreviewSimpleListItem} from '../fields/preview/base/PreviewSimpleListItem'; interface IProps { location?: ILocation; } export class OpenStreetMapPreviewList extends React.PureComponent { render() { const {gettext} = superdeskApi.localization; const location = this.props.location?.address?.external?.nominatim; if (location == null) { return null; } const fieldsToExclude: Array = [ 'lon', 'lat', 'boundingbox', 'extratags', 'namedetails', 'address', 'licence', 'icon', ]; const metadataFields = Object.keys(location) .filter((field: keyof INominatimItem) => !fieldsToExclude.includes(field)); return ( ); } }