diff --git a/CHANGELOG.md b/CHANGELOG.md index d0842af0..0604278a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### Fixed -* *Nothing* +* [#104](https://github.com/shlinkio/shlink-web-client/issues/104) Fixed blank page being showed when not-found paths are loaded. +* [#94](https://github.com/shlinkio/shlink-web-client/issues/94) Fixed initial zoom and center on maps. ## 2.0.0 - 2019-01-13 diff --git a/src/visits/helpers/MapModal.js b/src/visits/helpers/MapModal.js index a79cb672..06148299 100644 --- a/src/visits/helpers/MapModal.js +++ b/src/visits/helpers/MapModal.js @@ -1,6 +1,7 @@ import React from 'react'; import { Modal, ModalBody } from 'reactstrap'; import { Map, TileLayer, Marker, Popup } from 'react-leaflet'; +import { map, prop } from 'ramda'; import * as PropTypes from 'prop-types'; import './MapModal.scss'; @@ -25,6 +26,8 @@ const OpenStreetMapTile = () => ( /> ); +const calculateMapBounds = map(prop('latLong')); + const MapModal = ({ toggle, isOpen, title, locations }) => ( @@ -32,7 +35,7 @@ const MapModal = ({ toggle, isOpen, title, locations }) => ( {title} - + {locations.map(({ cityName, latLong, count }, index) => (