From 9db49eee23ac3fc7e09318b8b9497de6a6fe3536 Mon Sep 17 00:00:00 2001 From: prusswan Date: Fri, 24 Jan 2025 12:24:15 +0800 Subject: [PATCH] fixed lint errors --- src/components/App.tsx | 5 ++--- src/components/AppToolbar.tsx | 8 ++++---- src/components/MapMaplibreGl.tsx | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 102ce8a7..0cf2b38b 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -885,9 +885,8 @@ export default class App extends React.Component { } onFileSelected = (e: File[]) => { - var file = e[0]; - var pmt = new PMTiles(new FileSource(file)); - console.log("App.onFileSelected", pmt); + const file = e[0]; + const pmt = new PMTiles(new FileSource(file)); this.setState({ file: pmt }) diff --git a/src/components/AppToolbar.tsx b/src/components/AppToolbar.tsx index 965b7c93..b27f493b 100644 --- a/src/components/AppToolbar.tsx +++ b/src/components/AppToolbar.tsx @@ -295,10 +295,10 @@ class AppToolbarInternal extends React.Component { {({getRootProps, getInputProps}) => ( -
- - Drop file here -
+
+ + Drop file here +
)}
diff --git a/src/components/MapMaplibreGl.tsx b/src/components/MapMaplibreGl.tsx index f3345e69..6fc4b74a 100644 --- a/src/components/MapMaplibreGl.tsx +++ b/src/components/MapMaplibreGl.tsx @@ -139,12 +139,12 @@ class MapMaplibreGlInternal extends React.Component { - let layerNames = metadata.vector_layers.map((e: LayerSpecification) => e.id); + const layerNames = metadata.vector_layers.map((e: LayerSpecification) => e.id); map.style.sourceCaches["source"]._source.vectorLayerIds = layerNames; console.log("layerNames for inspect:", layerNames); @@ -166,7 +166,7 @@ class MapMaplibreGlInternal extends React.Component