• Visit https://console.developers.google.com

  • On the top menu bar, next to Google Cloud > NEW PROJECT

  • On the sidebar, click on Credentials > CREATE CREDENTIALS

  • CREATE CREDENTIALS > API Key

  • Copy the API key and place in your config.js

    export const GOOGLE_PLACES_KEY = "xxx-xxx";
  • To start using google services, you may need to enable the services by providing your credit card details

Before we start using it create a state in AdForm.js

  const [ad, setAd] = useState({
    photos: [],
    uploading: "",
    price: "",
    address: "",
    bedrooms: "",
    bathrooms: "",
    carpark: "",
    landsize: "",
    type: "",
    title: "",
    description: "",
    loading: "",
  });