I am trying to restrict the bounds in use-places-autocomplete
as below
requestOptions: {
types: ["geocode"],
fields: [
"name",
"address_components",
"geometry.location",
"place_id",
"formatted_address",
],
bounds: window.google.maps.LatLngBounds(bounds?.n, bounds?.w),
componentRestrictions: {
country: "ke",
},
initOnMount: true,
cache: false,
},
only this does not work. The bounds are gotten from geocode api and set as below
setBounds({
n: results[0].geometry.bounds.getNorthEast(),
w: results[0].geometry.bounds.getSouthWest()
})
is there something I am doing wrong