import React from 'react'; import MapView, {Circle, Marker} from 'react-native-maps'; const AdminCacheEditorView = ({ userLocation, caches, onAddCache, onMoveCache }) => { // Initialisation ------------- // State ---------------------- // Handlers ------------------- // View ----------------------- if (!userLocation) { return null; } return ( onAddCache(event.nativeEvent.coordinate)} showsUserLocation > {(caches || []).map((cache) => ( onMoveCache(cache.id, event.nativeEvent.coordinate)} title={`Cache ${cache.id}`} /> ))} ); }; export default AdminCacheEditorView;