import { icons } from "@/constants"; import { GoogleInputProps } from "@/types/type"; import { Image, View } from "react-native"; import { GooglePlacesAutocomplete } from "react-native-google-places-autocomplete"; import tw from "twrnc"; import 'react-native-get-random-values'; const googlePlacesApikey = process.env.EXPO_PUBLIC_GOOGLE_API_KEY as string; const GoogleInputField = ({ icon, initialLocation, containerStyle, textInputBackgroundColor, handlePress }: GoogleInputProps) => { return ( { handlePress({ latitude:details?.geometry.location.lat!, longitude: details?.geometry.location.lng!, address:data.description, }); }} query={{ key:googlePlacesApikey, language:"en", }} renderLeftButton={()=>( )} textInputProps={{ placeholderTextColor:"gray", placeholder: initialLocation ?? "where do you want to go?", }} /> ) } export default GoogleInputField;