From a12769f3f59b88cbdde575391b49a77c6c16d975 Mon Sep 17 00:00:00 2001 From: Maarten Date: Tue, 13 Aug 2024 13:11:28 +0200 Subject: [PATCH] Fix active markers visibility --- app/(tabs)/map.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/(tabs)/map.tsx b/app/(tabs)/map.tsx index 94dfae8..9ab29bb 100644 --- a/app/(tabs)/map.tsx +++ b/app/(tabs)/map.tsx @@ -95,13 +95,6 @@ export default function MapScreen() { return list; } - // Get all markers that needs to be visible - const activeMarkers = () => { - return markers.filter( (marker: any) => { - return getActiveTypes().includes( marker.waste_type ); - } ); - } - const handleCalloutPress = (id: any) => { console.log('set active', id); setActiveCalloutId( id ); @@ -137,7 +130,7 @@ export default function MapScreen() { zoomLevel={13} animationMode={'none'} /> - {activeMarkers().map( (marker: any, index: any) => ( + {markers.filter( (marker: any) => getActiveTypes().includes( marker.waste_type ) ).map( (marker: any, index: any) => (