Skip to content

Commit 47b370c

Browse files
committed
Fix linter errors
``` /home/runner/work/react-map-gl/react-map-gl/examples/get-started/hook/controls.jsx Error: 53:35 error Expected to return a value at the end of arrow function consistent-return /home/runner/work/react-map-gl/react-map-gl/examples/get-started/hook/controls2.js Error: 1:9 error 'useMap' is defined but never used no-unused-vars /home/runner/work/react-map-gl/react-map-gl/examples/get-started/hook/map.jsx Error: 2:14 error 'useMap' is defined but never used no-unused-vars ```
1 parent 9fc4fcb commit 47b370c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

examples/get-started/hook/controls.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function Controls() {
5151
}, []);
5252

5353
const onSubmit = useCallback(() => {
54-
if (!mymap) return undefined;
54+
if (!mymap) return;
5555

5656
const [lng, lat] = inputValue.split(',').map(Number);
5757
if (Math.abs(lng) <= 180 && Math.abs(lat) <= 85) {

examples/get-started/hook/controls2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {useMap} from 'react-map-gl';
1+
// import {useMap} from 'react-map-gl';
22

33
export default function Controls2() {
44
/**

examples/get-started/hook/map.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react';
2-
import Map, {useMap} from 'react-map-gl';
2+
import Map from 'react-map-gl';
3+
// import {useMap} from 'react-map-gl';
34

45
import 'mapbox-gl/dist/mapbox-gl.css';
56
import Controls2 from './controls2';

0 commit comments

Comments
 (0)