tf-checkout-react 1.4.1 → 1.4.3
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/dist/tf-checkout-react.cjs.development.js +26 -17
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +26 -17
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/seatMapContainer/index.tsx +5 -0
- package/src/components/ticketsContainer/ReferralLogic.tsx +4 -2
|
@@ -5219,8 +5219,8 @@ var PromoCodeSection = function PromoCodeSection(_ref) {
|
|
|
5219
5219
|
|
|
5220
5220
|
var ReferralLogic = function ReferralLogic(props) {
|
|
5221
5221
|
var eventId = props.eventId;
|
|
5222
|
-
var isWindowDefined = typeof window !== 'undefined';
|
|
5223
5222
|
React.useEffect(function () {
|
|
5223
|
+
var isWindowDefined = typeof window !== 'undefined';
|
|
5224
5224
|
if (isWindowDefined) {
|
|
5225
5225
|
var params = new URL("" + window.location).searchParams;
|
|
5226
5226
|
var referralId = params.get('ttf_r') || '';
|
|
@@ -5249,7 +5249,7 @@ var ReferralLogic = function ReferralLogic(props) {
|
|
|
5249
5249
|
}))();
|
|
5250
5250
|
}
|
|
5251
5251
|
}
|
|
5252
|
-
}, []);
|
|
5252
|
+
}, [eventId]);
|
|
5253
5253
|
return null;
|
|
5254
5254
|
};
|
|
5255
5255
|
|
|
@@ -8364,21 +8364,24 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
8364
8364
|
var _useState4 = React.useState([]),
|
|
8365
8365
|
reservedSeats = _useState4[0],
|
|
8366
8366
|
setReservedSeats = _useState4[1];
|
|
8367
|
-
var _useState5 = React.useState(
|
|
8368
|
-
|
|
8369
|
-
|
|
8367
|
+
var _useState5 = React.useState(true),
|
|
8368
|
+
isLoadingSeatMapData = _useState5[0],
|
|
8369
|
+
setIsLoadingSeatMapData = _useState5[1];
|
|
8370
8370
|
var _useState6 = React.useState(false),
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
var _useState7 = React.useState(
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
var _useState8 = React.useState(
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
var _useState9 = React.useState(
|
|
8380
|
-
|
|
8381
|
-
|
|
8371
|
+
isReserving = _useState6[0],
|
|
8372
|
+
setIsReserving = _useState6[1];
|
|
8373
|
+
var _useState7 = React.useState(false),
|
|
8374
|
+
isAddingToCart = _useState7[0],
|
|
8375
|
+
setIsAddingToCart = _useState7[1];
|
|
8376
|
+
var _useState8 = React.useState(null),
|
|
8377
|
+
error = _useState8[0],
|
|
8378
|
+
setError = _useState8[1];
|
|
8379
|
+
var _useState9 = React.useState(Date.now() <= Number(localStorage.getItem("reservationStart-" + eventId))),
|
|
8380
|
+
showTimer = _useState9[0],
|
|
8381
|
+
setShowTimer = _useState9[1];
|
|
8382
|
+
var _useState10 = React.useState({}),
|
|
8383
|
+
guestCounts = _useState10[0],
|
|
8384
|
+
setGuestCounts = _useState10[1];
|
|
8382
8385
|
var updateGuestCounts = function updateGuestCounts(data) {
|
|
8383
8386
|
_forEach(data, function (item) {
|
|
8384
8387
|
var tierTickets = ticketTypeTierRelationsRef.current[item.tierId];
|
|
@@ -8416,10 +8419,14 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
8416
8419
|
_context.t0 = _context["catch"](0);
|
|
8417
8420
|
setError('Something went wrong');
|
|
8418
8421
|
case 13:
|
|
8422
|
+
_context.prev = 13;
|
|
8423
|
+
setIsLoadingSeatMapData(false);
|
|
8424
|
+
return _context.finish(13);
|
|
8425
|
+
case 16:
|
|
8419
8426
|
case "end":
|
|
8420
8427
|
return _context.stop();
|
|
8421
8428
|
}
|
|
8422
|
-
}, _callee, null, [[0, 10]]);
|
|
8429
|
+
}, _callee, null, [[0, 10, 13, 16]]);
|
|
8423
8430
|
})), [eventId]);
|
|
8424
8431
|
var fetchSeatMapReservations = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
8425
8432
|
var statusesResponse, statuses, reservationData, ownReservations;
|
|
@@ -8730,6 +8737,8 @@ var SeatMapContainer = function SeatMapContainer(props) {
|
|
|
8730
8737
|
onCountdownFinish();
|
|
8731
8738
|
}
|
|
8732
8739
|
}
|
|
8740
|
+
}), !isLoadingSeatMapData && React__default.createElement(ReferralLogic, {
|
|
8741
|
+
eventId: eventId
|
|
8733
8742
|
}), React__default.createElement(TicketsSection$1, {
|
|
8734
8743
|
selectedTickets: selectedTickets,
|
|
8735
8744
|
handleTicketSelect: handleTicketSelect,
|