diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-05 11:50:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-05 11:50:10 -0700 |
commit | 158f8ba27f354b53f4d25613d1ff1828cbad0bea (patch) | |
tree | 397aa64ea4c4151c86371642c37f32e9d7fa9e89 | |
parent | 8be2723476e7b3f1905446a2d7dce36c8c11cf60 (diff) | |
download | etbsa-traccar-web-158f8ba27f354b53f4d25613d1ff1828cbad0bea.tar.gz etbsa-traccar-web-158f8ba27f354b53f4d25613d1ff1828cbad0bea.tar.bz2 etbsa-traccar-web-158f8ba27f354b53f4d25613d1ff1828cbad0bea.zip |
Fix lint issues
-rw-r--r-- | modern/src/MainPage.js | 2 | ||||
-rw-r--r-- | modern/src/map/MapPadding.js | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index e632bf9..7fd4315 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -110,7 +110,7 @@ const MainPage = () => { return ( <div className={classes.root}> <Map> - {!isTablet && <MapPadding left={parseInt(theme.dimensions.drawerWidthDesktop)} />} + {!isTablet && <MapPadding left={parseInt(theme.dimensions.drawerWidthDesktop, 10)} />} <CurrentLocationMap /> <GeofenceMap /> <AccuracyMap /> diff --git a/modern/src/map/MapPadding.js b/modern/src/map/MapPadding.js index cb16579..dec41b4 100644 --- a/modern/src/map/MapPadding.js +++ b/modern/src/map/MapPadding.js @@ -2,10 +2,16 @@ import { useEffect } from 'react'; import { map } from './Map'; -const MapPadding = ({ top, right, bottom, left }) => { +const MapPadding = ({ + top, right, bottom, left, +}) => { useEffect(() => { - map.setPadding({ top, right, bottom, left }); - return () => map.setPadding({ top: 0, right: 0, bottom: 0, left: 0 }); + map.setPadding({ + top, right, bottom, left, + }); + return () => map.setPadding({ + top: 0, right: 0, bottom: 0, left: 0, + }); }, [top, right, bottom, left]); return null; |