mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
29 lines
602 B
JavaScript
29 lines
602 B
JavaScript
import React from 'react';
|
|
import Map from '../js/map/map.js';
|
|
import { areEqual } from '../js/data/utilities.js';
|
|
|
|
class Viewport extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
componentDidMount() {
|
|
this.map = new Map(this.props.app, this.props.ui, this.props.methods);
|
|
this.map.update(this.props.domain, this.props.app);
|
|
}
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
this.map.update(nextProps.domain, nextProps.app);
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div className='map-wrapper'>
|
|
<div id="map" />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Viewport;
|