import React, { useRef } from 'react'; import { View, TouchableOpacity, StyleSheet } from 'react-native'; import * as MapLibreRN from '@maplibre/maplibre-react-native'; import { useNavigation } from '@react-navigation/native'; import { Colors } from 'src/theme'; import { VECTOR_MAP_HOST } from 'src/constants'; import { NAVIGATION_PAGES } from 'src/types'; const MessageLocation = ({ props, lat, lng, onLongPress }: { props: any; lat: number; lng: number; onLongPress: (currentMessage: any, props: any) => void; }) => { const navigation = useNavigation(); const mapRef = useRef(null); const cameraRef = useRef(null); return ( navigation.navigate(...([NAVIGATION_PAGES.FULL_MAP_VIEW, { lat, lng }] as never)) } onLongPress={() => onLongPress(props.currentMessage, props)} > ); }; const styles = StyleSheet.create({ container: { width: '100%', height: 150, borderRadius: 10, overflow: 'hidden' }, map: { flex: 1 } }); export default MessageLocation;