Closed sohailshams closed 3 years ago
hey can you help me My map isnot zooming to the countries when I select the puticular coutry from menu
change your Map.js to following code; function ChangeMapView({ coords, zoom }) { const map = useMap(); map.setView([coords.lat, coords.lng], zoom);
return null; }
function Map({ countries, casesType, center, zoom }) { return (
); }
export default Map; and in App.js in onCountryChange add following code. const { countryInfo: { lat, long }, } = data; setMapCenter({ lat, lng: long });
setMapZoom(4);
Were you able to solve this issue? I am also facing the same problem.
Hi Guys, when I click on recovered cased my graph goes into -ve y axis as shown in the image. However when I click on cases and deaths it appears fine. Anyone faced the same issue ? I double checked the code with source code and it seems identical. Can anyone help to find out what is wrong here.