From 16d97138a1e71f13b52e9845699fc9691c680b93 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Mon, 25 Nov 2024 16:38:20 +0800 Subject: [PATCH] fix types --- app/App.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/App.tsx b/app/App.tsx index 90c8013..c0886d5 100644 --- a/app/App.tsx +++ b/app/App.tsx @@ -76,7 +76,7 @@ function App() { map = new maplibregl.Map({ container: "map", - style: getStyle(selectedIndex()), + style: getStyle(selectedIndex(),showLabels()), }); }); @@ -88,8 +88,9 @@ function App() { setSelectedIndex(i); } - const handleShowLabelsChange = (event) => { - setShowLabels(event.target.checked); + const handleShowLabelsChange = (event: Event) => { + const target = event.target as HTMLInputElement; + setShowLabels(target.checked); }; console.log(showLabels());