import React from 'react'; import HandlerMap from './HandlerMap'; export default class Container extends React.Component { constructor(props) { super(props); this.oms = this.oms.bind(this); this.keyHandlerMap = new Map([[['alt+c', 'option+c'], this.oms]]); } oms(event) { const omsUrl = [ `${window.location.protocol}/`, window.location.host, 'cityoms3/4.0.html', ].join('/'); window.open(omsUrl, '_blank'); } render() { return ( <HandlerMap keyHandlerMap={this.keyHandlerMap}> {this.props.children} </HandlerMap> ); } }