@tripian/react 6.0.34 → 6.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -72384,13 +72384,15 @@ var StepTravelerInfo = function (_a) {
|
|
|
72384
72384
|
var tripProfile = _a.tripProfile, setTripProfile = _a.setTripProfile, bound = _a.bound, cities = _a.cities, setBound = _a.setBound, userCompanionQuestions = _a.userCompanionQuestions, userCompanions = _a.userCompanions, companionLoadingList = _a.companionLoadingList, callbackUserCompanionAdd = _a.callbackUserCompanionAdd, travelerInfoTips = _a.travelerInfoTips;
|
|
72385
72385
|
var _b = (0, react_1.useState)(travelerInfoTips[0]), tip = _b[0], setTip = _b[1];
|
|
72386
72386
|
(0, react_1.useEffect)(function () {
|
|
72387
|
+
var _a;
|
|
72387
72388
|
var currentCity = cities.find(function (city) { return city.id === tripProfile.cityId; });
|
|
72388
72389
|
if (currentCity) {
|
|
72389
|
-
var
|
|
72390
|
+
var parentCity = cities.find(function (city) { return city.id === currentCity.parentLocationId; });
|
|
72391
|
+
var boundary = (_a = parentCity === null || parentCity === void 0 ? void 0 : parentCity.boundary) !== null && _a !== void 0 ? _a : currentCity.boundary;
|
|
72392
|
+
var newBoundary = new google.maps.LatLngBounds(new google.maps.LatLng(boundary[0], boundary[2]), new google.maps.LatLng(boundary[1], boundary[3]));
|
|
72390
72393
|
setBound(newBoundary);
|
|
72391
72394
|
}
|
|
72392
|
-
|
|
72393
|
-
}, [cities, tripProfile.cityId]);
|
|
72395
|
+
}, [cities, setBound, tripProfile.cityId]);
|
|
72394
72396
|
var callbackAdultsNumber = function (num) {
|
|
72395
72397
|
var newTripProfile = __assign({}, tripProfile);
|
|
72396
72398
|
newTripProfile.numberOfAdults = num;
|