Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 7768 | Rev 7853 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7768 Rev 7826
Línea 22... Línea 22...
22
};
22
};
Línea 23... Línea 23...
23
 
23
 
24
function handleScriptLoad(updateQuery, autoCompleteRef) {
24
function handleScriptLoad(updateQuery, autoCompleteRef) {
25
    autoComplete = new window.google.maps.places.Autocomplete(
25
    autoComplete = new window.google.maps.places.Autocomplete(
26
        autoCompleteRef.current,
26
        autoCompleteRef.current,
27
        { types: ["(cities)"], componentRestrictions: { country: "us" } }
27
        { types: ["(cities)"] }
28
    );
28
    );
29
    autoComplete.setFields(["address_components", "formatted_address"]);
29
    autoComplete.setFields(["address_components", "formatted_address"]);
30
    autoComplete.addListener("place_changed", () =>
30
    autoComplete.addListener("place_changed", () =>
31
        handlePlaceSelect(updateQuery)
31
        handlePlaceSelect(updateQuery)
Línea 38... Línea 38...
38
    updateQuery(query);
38
    updateQuery(query);
39
    console.log(addressObject);
39
    console.log(addressObject);
40
}
40
}
Línea 41... Línea 41...
41
 
41
 
42
function SearchLocationInput({ googleApiKey, setValue, value }) {
42
function SearchLocationInput({ googleApiKey, setValue, value }) {
43
    
43
 
Línea 44... Línea 44...
44
    const autoCompleteRef = useRef(null);
44
    const autoCompleteRef = useRef(null);
45
 
45
 
46
    useEffect(() => {
46
    useEffect(() => {