diff --git a/examples/get-started/hook/controls.jsx b/examples/get-started/hook/controls.jsx index b306b9a91..c1e23baef 100644 --- a/examples/get-started/hook/controls.jsx +++ b/examples/get-started/hook/controls.jsx @@ -51,7 +51,7 @@ export default function Controls() { }, []); const onSubmit = useCallback(() => { - if (!mymap) return undefined; + if (!mymap) return; const [lng, lat] = inputValue.split(',').map(Number); if (Math.abs(lng) <= 180 && Math.abs(lat) <= 85) { diff --git a/examples/get-started/hook/controls2.js b/examples/get-started/hook/controls2.js index c47fc19af..139ac5a35 100644 --- a/examples/get-started/hook/controls2.js +++ b/examples/get-started/hook/controls2.js @@ -1,4 +1,4 @@ -import {useMap} from 'react-map-gl'; +// import {useMap} from 'react-map-gl'; export default function Controls2() { /** diff --git a/examples/get-started/hook/map.jsx b/examples/get-started/hook/map.jsx index 4e4edda75..dad4e6cd7 100644 --- a/examples/get-started/hook/map.jsx +++ b/examples/get-started/hook/map.jsx @@ -1,5 +1,6 @@ import * as React from 'react'; -import Map, {useMap} from 'react-map-gl'; +import Map from 'react-map-gl'; +// import {useMap} from 'react-map-gl'; import 'mapbox-gl/dist/mapbox-gl.css'; import Controls2 from './controls2';