From 1020f8255f0a5c3c7dbc71c8192e1dcb1b787670 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Wed, 17 Jan 2024 13:40:48 -0800 Subject: [PATCH] fix: no any --- apps/antalmanac/src/components/Map/Map.tsx | 19 +++++++++++-------- apps/antalmanac/src/components/Map/Marker.tsx | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/apps/antalmanac/src/components/Map/Map.tsx b/apps/antalmanac/src/components/Map/Map.tsx index 4516c7ef3..8408c1446 100644 --- a/apps/antalmanac/src/components/Map/Map.tsx +++ b/apps/antalmanac/src/components/Map/Map.tsx @@ -289,13 +289,16 @@ export default function CourseMap() { */ const startDestPairs = useMemo(() => { const allEvents = [...markersToDisplay, ...customEventMarkersToDisplay]; - return allEvents.reduce((acc, cur, index) => { - acc.push([cur]); - if (index > 0) { - acc[index - 1].push(cur); - } - return acc; - }, [] as (typeof allEvents)[]); + return allEvents.reduce( + (acc, cur, index) => { + acc.push([cur]); + if (index > 0) { + acc[index - 1].push(cur); + } + return acc; + }, + [] as (typeof allEvents)[] + ); }, [markersToDisplay, customEventMarkersToDisplay]); return ( @@ -352,7 +355,7 @@ export default function CourseMap() { diff --git a/apps/antalmanac/src/components/Map/Marker.tsx b/apps/antalmanac/src/components/Map/Marker.tsx index 34a0110d1..477840bf9 100644 --- a/apps/antalmanac/src/components/Map/Marker.tsx +++ b/apps/antalmanac/src/components/Map/Marker.tsx @@ -10,7 +10,7 @@ const IMAGE_CMS_URL = 'https://cms.concept3d.com/map/lib/image-cache/i.php?mapId /** * returns a leaflet DivIcon that can replace the marker's default blue icon */ -function getMarkerIcon(color = '', stackIndex = 1, label: any = '') { +function getMarkerIcon(color = '', stackIndex = 1, label = '') { return Leaflet.divIcon({ /** * Adds offset to __marker__ for stacking markers. @@ -63,7 +63,7 @@ interface Props { location?: string; acronym?: string; stackIndex?: number; - label?: any; + label?: string; children?: React.ReactNode; }