tf-checkout-react 1.6.5-beta.1 → 1.6.5-beta.2

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.
@@ -1,9 +1,9 @@
1
+ /// <reference types="react" />
1
2
  import './style.css';
2
3
  import { ThemeOptions } from '@mui/material';
3
4
  import { CSSProperties } from '@mui/styles';
4
5
  import { AxiosError } from 'axios';
5
6
  import { FormikHelpers, FormikValues } from 'formik';
6
- import { ReactNode } from 'react';
7
7
  import { IBillingInfoData } from '../../types';
8
8
  export interface IBillingInfoPage {
9
9
  data?: IBillingInfoData[];
@@ -53,7 +53,6 @@ export interface IBillingInfoPage {
53
53
  customFieldsOrderKeys?: string[];
54
54
  customFieldsTicketHolderKeys?: string[];
55
55
  onPendingVerification?: () => void;
56
- CustomLogin?: ReactNode;
57
56
  }
58
57
  declare const WithCustomFieldsBillingInfoContainer: (props: any) => JSX.Element;
59
58
  export { WithCustomFieldsBillingInfoContainer as BillingInfoContainer };
@@ -3846,8 +3846,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
3846
3846
  _ref4$onGetCheckoutCo = _ref4.onGetCheckoutConfigsSuccess,
3847
3847
  onGetCheckoutConfigsSuccess = _ref4$onGetCheckoutCo === void 0 ? _identity : _ref4$onGetCheckoutCo,
3848
3848
  _ref4$onGetCheckoutCo2 = _ref4.onGetCheckoutConfigsError,
3849
- onGetCheckoutConfigsError = _ref4$onGetCheckoutCo2 === void 0 ? _identity : _ref4$onGetCheckoutCo2,
3850
- CustomLogin = _ref4.CustomLogin;
3849
+ onGetCheckoutConfigsError = _ref4$onGetCheckoutCo2 === void 0 ? _identity : _ref4$onGetCheckoutCo2;
3851
3850
  var _useState = React.useState(null),
3852
3851
  extraData = _useState[0],
3853
3852
  setExtraData = _useState[1];
@@ -4646,7 +4645,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
4646
4645
  }, props.isSubmitting ? React__default.createElement(material.CircularProgress, {
4647
4646
  size: 26
4648
4647
  }) : buttonName))));
4649
- }), CustomLogin ? CustomLogin : null, showModalLogin && !CustomLogin ? React__default.createElement(LoginModal, {
4648
+ }), showModalLogin && React__default.createElement(LoginModal, {
4650
4649
  logo: logo,
4651
4650
  onClose: function onClose() {
4652
4651
  setShowModalLogin(false);
@@ -4674,7 +4673,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
4674
4673
  setShowModalSignup(true);
4675
4674
  },
4676
4675
  showPoweredByImage: showPoweredByImage
4677
- }) : null, showModalSignup && React__default.createElement(SignupModal, {
4676
+ }), showModalSignup && React__default.createElement(SignupModal, {
4678
4677
  onClose: function onClose() {
4679
4678
  setShowModalSignup(false);
4680
4679
  },
@@ -6270,7 +6269,12 @@ function useLocalStorageListener(key, callback) {
6270
6269
  var newValue = localStorage.getItem(key);
6271
6270
  if (newValue !== value) {
6272
6271
  setValue(newValue);
6273
- callback(JSON.parse(newValue || ''));
6272
+ if (newValue) {
6273
+ var parsed = JSON.parse(newValue);
6274
+ if (parsed) {
6275
+ callback(parsed);
6276
+ }
6277
+ }
6274
6278
  }
6275
6279
  }, 100);
6276
6280
  return function () {
@@ -7378,23 +7382,18 @@ var TicketsContainer = function TicketsContainer(_ref) {
7378
7382
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7379
7383
  while (1) switch (_context3.prev = _context3.next) {
7380
7384
  case 0:
7381
- _context3.prev = 0;
7382
- _context3.next = 3;
7385
+ _context3.next = 2;
7383
7386
  return getProfileData();
7384
- case 3:
7387
+ case 2:
7385
7388
  userDataResponse = _context3.sent;
7386
7389
  profileData = _get(userDataResponse, 'data');
7387
7390
  profileDataObj = setLoggedUserData(profileData);
7388
7391
  return _context3.abrupt("return", profileDataObj);
7389
- case 9:
7390
- _context3.prev = 9;
7391
- _context3.t0 = _context3["catch"](0);
7392
- throw new Error(_context3.t0);
7393
- case 12:
7392
+ case 6:
7394
7393
  case "end":
7395
7394
  return _context3.stop();
7396
7395
  }
7397
- }, _callee3, null, [[0, 9]]);
7396
+ }, _callee3);
7398
7397
  }));
7399
7398
  return function fetchUserData() {
7400
7399
  return _ref5.apply(this, arguments);