diff --git a/app/client/src/components/propertyControls/LocationSearchControl.tsx b/app/client/src/components/propertyControls/LocationSearchControl.tsx index f612e4595d..73dbce4f9b 100644 --- a/app/client/src/components/propertyControls/LocationSearchControl.tsx +++ b/app/client/src/components/propertyControls/LocationSearchControl.tsx @@ -3,6 +3,8 @@ import BaseControl, { ControlProps } from "./BaseControl"; import styled from "styled-components"; import SearchBox from "react-google-maps/lib/components/places/SearchBox"; import StandaloneSearchBox from "react-google-maps/lib/components/places/StandaloneSearchBox"; +import { getAppsmithConfigs } from "configs"; + const { compose, withProps, lifecycle } = require("recompose"); const { withScriptjs } = require("react-google-maps"); @@ -25,10 +27,11 @@ interface StandaloneSearchBoxProps { onPlacesChanged: () => void; } +const { google } = getAppsmithConfigs(); + const PlacesWithStandaloneSearchBox = compose( withProps({ - googleMapURL: - "https://maps.googleapis.com/maps/api/js?key=AIzaSyC2H_twoNbEKMm9Q0nYAh7715Dplg2asCI&v=3.exp&libraries=geometry,drawing,places", + googleMapURL: `https://maps.googleapis.com/maps/api/js?key=${google.apiKey}&v=3.exp&libraries=geometry,drawing,places`, loadingElement:
, containerElement: , }),