Skip to content

Commit

Permalink
fix: no any
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Jan 17, 2024
1 parent 3f08a96 commit 1020f82
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions apps/antalmanac/src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -352,7 +355,7 @@ export default function CourseMap() {
<Fragment key={Object.values(marker).join('')}>
<LocationMarker
{...marker}
label={today === 'All' ? undefined : index + 1}
label={today === 'All' ? undefined : (index + 1).toString()}
stackIndex={coursesSameBuildingPrior.length}
>
<Box>
Expand Down
4 changes: 2 additions & 2 deletions apps/antalmanac/src/components/Map/Marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -63,7 +63,7 @@ interface Props {
location?: string;
acronym?: string;
stackIndex?: number;
label?: any;
label?: string;
children?: React.ReactNode;
}

Expand Down

0 comments on commit 1020f82

Please sign in to comment.