Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
```
/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
```
  • Loading branch information
tordans committed Jul 10, 2024
1 parent 9fc4fcb commit 47b370c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/get-started/hook/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/hook/controls2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useMap} from 'react-map-gl';
// import {useMap} from 'react-map-gl';

export default function Controls2() {
/**
Expand Down
3 changes: 2 additions & 1 deletion examples/get-started/hook/map.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 47b370c

Please sign in to comment.