mario-core 2.9.32-beta → 2.9.33-beta

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.
@@ -301,6 +301,16 @@ var apiUpload = axios.create({
301
301
  Object.keys(localStorage).forEach(function (key) {
302
302
  if (!key.includes('learning-plan')) delete localStorage[key];
303
303
  });
304
+ var userEmail = localStorage.getItem("USER_EMAIL");
305
+
306
+ if (userEmail) {
307
+ amplitude.getInstance().logEvent("general: session end", {
308
+ user_id: userEmail
309
+ });
310
+ amplitude.getInstance().resetSessionId();
311
+ }
312
+
313
+ localStorage.setItem("USER_EMAIL", "");
304
314
  window.location.href = "/login";
305
315
  }
306
316
 
@@ -434,6 +444,7 @@ var useLogin = function useLogin() {
434
444
  amplitude.getInstance().logEvent("general: session start", {
435
445
  user_id: data.email
436
446
  });
447
+ localStorage.setItem("USER_EMAIL", data.email);
437
448
 
438
449
  if (isLoginFirst) {
439
450
  amplitude.getInstance().logEvent("general: first login", {