Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
children: props => {
const system = props.imperial ? 'mi' : 'km'
return `${geolib.convertUnit(system, props.distance, 1)} ${system} away`
},
color: 'white',
function getDistance(fromLocation, toLocation) {
const distance = geolib.getDistance(fromLocation, toLocation);
return geolib.convertUnit('mi', distance, 1);
}