@stokr/components-library 2.0.8 → 2.0.9

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.
@@ -188,7 +188,7 @@ var Enable2FAFlow = function Enable2FAFlow(_ref) {
188
188
  }), /*#__PURE__*/_react.default.createElement(_EnterCode.default, {
189
189
  id: "enter-code",
190
190
  changeStep: function changeStep() {
191
- console.log('here');
191
+ // console.log('here')
192
192
  },
193
193
  popupError: popupError,
194
194
  onFormSend: onSubmit
@@ -61,7 +61,6 @@ var Main2FAFlow = function Main2FAFlow(_ref) {
61
61
  setsuccessMessage = _useState6[1];
62
62
  (0, _react.useEffect)(function () {
63
63
  if (userMfaEnrollment) {
64
- console.log('🚀 ~ file: main-flow.js:25 ~ userMfaEnrollment:', userMfaEnrollment);
65
64
  if (userMfaEnrollment.length > 0) setis2FAEnabled(true);
66
65
  } else if (user) {
67
66
  checkMfaEnrollment(user);
@@ -52,7 +52,6 @@ var Analytic = /*#__PURE__*/function () {
52
52
  return matomoConnect.init(matomoConnect.GetVisitsSummary, 'month', "".concat(this.START_DATE.format('YYYY-MM-DD'), ",").concat(this.CURRENT_DATE.format('YYYY-MM-DD')));
53
53
  case 3:
54
54
  this.VISITS_SUMMARY = _context.sent;
55
- console.log('visits summary: ', this.VISITS_SUMMARY);
56
55
  Object.keys(this.VISITS_SUMMARY).forEach(function (key) {
57
56
  _this.TOTAL_SUMMARY.visits += _this.VISITS_SUMMARY[key].nb_visits || 0;
58
57
  _this.TOTAL_SUMMARY.bounce_count += _this.VISITS_SUMMARY[key].bounce_count || 0;
@@ -60,7 +59,7 @@ var Analytic = /*#__PURE__*/function () {
60
59
  _this.TOTAL_SUMMARY.unique_visitors += _this.VISITS_SUMMARY[key].nb_uniq_visitors || 0;
61
60
  _this.TOTAL_SUMMARY.avg_time_on_site += _this.VISITS_SUMMARY[key].avg_time_on_site || 0;
62
61
  });
63
- case 6:
62
+ case 5:
64
63
  case "end":
65
64
  return _context.stop();
66
65
  }
@@ -211,7 +211,7 @@ var AlgoAdressSelect = function AlgoAdressSelect(props) {
211
211
  while (1) switch (_context3.prev = _context3.next) {
212
212
  case 0:
213
213
  if (!(0, _StokrWeb.isAlgoSignerInstalled)()) {
214
- _context3.next = 19;
214
+ _context3.next = 18;
215
215
  break;
216
216
  }
217
217
  _context3.prev = 1;
@@ -219,31 +219,30 @@ var AlgoAdressSelect = function AlgoAdressSelect(props) {
219
219
  return (0, _StokrWeb.getAlgoSignerAddress)(props.network);
220
220
  case 4:
221
221
  _address = _context3.sent;
222
- console.log('address: ', _address);
223
222
  if (!_address) {
224
- _context3.next = 12;
223
+ _context3.next = 11;
225
224
  break;
226
225
  }
227
- _context3.next = 9;
226
+ _context3.next = 8;
228
227
  return getBalanceData(_address);
229
- case 9:
228
+ case 8:
230
229
  setfailed(false);
231
230
  setcorrect(true);
232
231
  setaddress(_address);
233
- case 12:
234
- _context3.next = 19;
232
+ case 11:
233
+ _context3.next = 18;
235
234
  break;
236
- case 14:
237
- _context3.prev = 14;
235
+ case 13:
236
+ _context3.prev = 13;
238
237
  _context3.t0 = _context3["catch"](1);
239
238
  console.log('eroor: ', _context3.t0);
240
239
  setfailed(true);
241
240
  setcorrect(false);
242
- case 19:
241
+ case 18:
243
242
  case "end":
244
243
  return _context3.stop();
245
244
  }
246
- }, _callee3, null, [[1, 14]]);
245
+ }, _callee3, null, [[1, 13]]);
247
246
  }));
248
247
  return function initAlgoSigner() {
249
248
  return _ref2.apply(this, arguments);
@@ -58,7 +58,6 @@ var SelectProject = function SelectProject(_ref) {
58
58
  setselectedProject(project);
59
59
  changeStep();
60
60
  } else {
61
- console.log('🚀 ~ process.env', process.env);
62
61
  window.location.href = "https://".concat(process.env.REACT_APP_WEBSITE_DOMAIN, "/").concat(project.name);
63
62
  }
64
63
  }
@@ -708,9 +708,6 @@ var HeaderHoClass = /*#__PURE__*/function (_Component) {
708
708
  password = _ref10.password;
709
709
  _this2.clearPopupError();
710
710
  _this2.setIsActionLoading('resetPassword');
711
-
712
- //localhost:3001/manage-user?mode=resetPassword&oobCode=PT_AyRFYWXwDe0Ols12TOKSiGQUSdb6mM4DKDLwHGdQAAAGMgUUaEQ&apiKey=AIzaSyBBp_3Romnfv--YpUuV0mJgDymvSp3oq0c&continueUrl=https%3A%2F%2Fstokr.info&lang=en
713
- //https://stokr.info/manage-user?mode=resetPassword&oobCode=TGhCFwb9uLeYiL2Hp4LFgRg5Fd9osw1Fvza4qY5Hhy0AAAGMgmuGuw&apiKey=AIzaSyBBp_3Romnfv--YpUuV0mJgDymvSp3oq0c&continueUrl=https%3A%2F%2Fstokr.info&lang=en
714
711
  _context6.prev = 3;
715
712
  _context6.next = 6;
716
713
  return handleResetPassword(password);
@@ -297,7 +297,6 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
297
297
  })));
298
298
  _defineProperty(_assertThisInitialized(_this), "checkMfaEnrollment", function (user) {
299
299
  var checkMfaEnrollment = (0, _auth.multiFactor)(user).enrolledFactors;
300
- console.log('🚀 ~ file: AuthContext.js:173 ~ checkMfaEnrollment:', checkMfaEnrollment);
301
300
  _this.setState({
302
301
  userMfaEnrollment: checkMfaEnrollment
303
302
  });
@@ -338,9 +337,7 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
338
337
  while (1) switch (_context7.prev = _context7.next) {
339
338
  case 0:
340
339
  redirect = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : false;
341
- (0, _auth.signOut)(_firebaseConfig.auth).then(function () {
342
- console.log('logged out');
343
- });
340
+ (0, _auth.signOut)(_firebaseConfig.auth).then(function () {});
344
341
  _Auth.default.logout();
345
342
  delete _axios.default.defaults.headers.common.Authorization;
346
343
  _this.setUser(null);
@@ -400,34 +397,31 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
400
397
  isFetchingUser: true
401
398
  });
402
399
  _axios.default.defaults.headers.common.Authorization = "Bearer ".concat(accessToken);
403
- console.log('🚀 ~ Im in get user:');
400
+
404
401
  //pass this function as a prop if you need any custom logic after user/get
405
402
  customValidateGetUser = _this.props.customValidateGetUser;
406
- _context8.prev = 8;
407
- _context8.next = 11;
403
+ _context8.prev = 7;
404
+ _context8.next = 10;
408
405
  return _Auth.default.getUser();
409
- case 11:
406
+ case 10:
410
407
  result = _context8.sent;
411
408
  firebaseUser = _this.state.firebaseUser;
412
409
  if (firebaseUser) {
413
- _context8.next = 21;
410
+ _context8.next = 20;
414
411
  break;
415
412
  }
416
- _context8.next = 16;
413
+ _context8.next = 15;
417
414
  return (0, _fetchData.default)('auth/get-custom-token');
418
- case 16:
415
+ case 15:
419
416
  _yield$fetchData = _context8.sent;
420
417
  customToken = _yield$fetchData.customToken;
421
- _context8.next = 20;
418
+ _context8.next = 19;
422
419
  return _Auth.default.signInWithToken(customToken);
423
- case 20:
420
+ case 19:
424
421
  firebaseUser = _context8.sent;
425
- case 21:
422
+ case 20:
426
423
  //merge firebaseUser and our user object
427
- user = _this.patchUserObject(result.user, firebaseUser);
428
- console.log('🚀 ~ file: AuthContext.js:259 ~ user:', user);
429
-
430
- //if user is empty throw an error
424
+ user = _this.patchUserObject(result.user, firebaseUser); //if user is empty throw an error
431
425
  //if user hasn't completed the signup process, redirect to welcome page on signup
432
426
  _this.checkUserIsValid(user);
433
427
  customValidateGetUser && customValidateGetUser(user);
@@ -443,19 +437,19 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
443
437
 
444
438
  //if you need user info immediately after call (before setState is executed), you can use this
445
439
  return _context8.abrupt("return", user);
446
- case 33:
447
- _context8.prev = 33;
448
- _context8.t0 = _context8["catch"](8);
440
+ case 31:
441
+ _context8.prev = 31;
442
+ _context8.t0 = _context8["catch"](7);
449
443
  _this.setState({
450
444
  isFetchingUser: false
451
445
  });
452
446
  console.log("Error in getUser: ".concat(_context8.t0));
453
447
  throw _context8.t0;
454
- case 38:
448
+ case 36:
455
449
  case "end":
456
450
  return _context8.stop();
457
451
  }
458
- }, _callee8, null, [[8, 33]]);
452
+ }, _callee8, null, [[7, 31]]);
459
453
  })));
460
454
  _defineProperty(_assertThisInitialized(_this), "checkUserPhoto", function (avatar) {
461
455
  try {
@@ -474,7 +468,6 @@ var AuthProviderClass = /*#__PURE__*/function (_Component) {
474
468
  }
475
469
  });
476
470
  _defineProperty(_assertThisInitialized(_this), "checkUserIsValid", function (user) {
477
- console.log('🚀 ~ check user is valid:');
478
471
  if (!user) {
479
472
  throw new Error('User is not defined');
480
473
  } else if (!(user !== null && user !== void 0 && user.emailVerified) && !window.location.href.includes('signup.')) {
@@ -80,7 +80,6 @@ var checkSaleTimeLeft = function checkSaleTimeLeft(project) {
80
80
  hasClosed: false
81
81
  });
82
82
  }
83
- console.log('🚀 ~ file: TrendingSlide.jsx:772 ~ timeLeftData:', timeLeftData, project.name, calculateTimeLeft(timeLeftData));
84
83
  }
85
84
  return calculateTimeLeft(timeLeftData);
86
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",