// components/forms/AdForm.js
import GooglePlacesAutocomplete from "react-google-places-autocomplete";
import { GOOGLE_PLACES_KEY } from "../../config";

<div className="mb-3 form-control">
  <GooglePlacesAutocomplete
    apiKey={GOOGLE_PLACES_KEY}
    apiOptions={{ region: "au" }}
    selectProps={{
      defaultInputValue: ad?.address,
      placeholder: "Search for address..",
      onChange: ({ value }) => {
        // console.log("address onchange => ", value.description);
        setAd({ ...ad, address: value.description });
      },
    }}
  />
</div>