From 4ac02574d459df2c0ea0250b00bca8673489b844 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Tue, 3 May 2022 15:08:18 -0700 Subject: [PATCH] doc: add mapCenter and mapZoom state and pass them as props --- src/App.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 02759a9..afc1aac 100644 --- a/src/App.js +++ b/src/App.js @@ -20,6 +20,8 @@ function App() { const [countryInfo, setCountryInfo] = useState({}); const [casesType, setCasesType] = useState("cases"); const [tableData, setTableData] = useState([]); + const [mapCenter, setMapCenter] = useState({ lat: 34.80746, lng: -40.4796 }); + const [mapZoom, setMapZoom] = useState(3); useEffect(() => { fetch("https://disease.sh/v3/covid-19/all") @@ -96,7 +98,7 @@ function App() { /> - +