text: import React, {useState, useEffect} from 'react';
  import {View, TextInput, SafeAreaView} from 'react-native';
  import { useNavigation } from '@react-navigation/native';
  import MapView, {PROVIDER_GOOGLE, Marker} from 'react-native-maps';
  
  import styles from './styles.js';
  import PlaceRow from "./PlaceRow";
  
  const homePlace = {
    description: 'Home',
    geometry: { location: { lat: 48.8152937, lng: 2.4597668 } },
  };
  const workPlace = {
    description: 'Work',
    geometry: { location: { lat: 48.8496818, lng: 2.2940881 } },
  };
  
  const DestinationSearch = (props) => {
    const [originPlace, setOriginPlace] = useState(null);
    const [destinationPlace, setDestinationPlace] = useState(null);
  
    const navigation = useNavigation();
  
    const checkNavigation = () => {
      if (originPlace && destinationPlace) {
        navigation.navigate('SearchResults', {
          originPlace,
          destinationPlace,
        })
      }
    }
  
    useEffect(() => {
      checkNavigation();
    }, [originPlace, destinationPlace]);
  
    return (
      <SafeAreaView>
        
      </SafeAreaView>
    );
  };
  
  export default DestinationSearch;
  