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.
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -304,6 +304,16 @@ var apiUpload = axios.create({
|
|
|
304
304
|
Object.keys(localStorage).forEach(function (key) {
|
|
305
305
|
if (!key.includes('learning-plan')) delete localStorage[key];
|
|
306
306
|
});
|
|
307
|
+
var userEmail = localStorage.getItem("USER_EMAIL");
|
|
308
|
+
|
|
309
|
+
if (userEmail) {
|
|
310
|
+
amplitude.getInstance().logEvent("general: session end", {
|
|
311
|
+
user_id: userEmail
|
|
312
|
+
});
|
|
313
|
+
amplitude.getInstance().resetSessionId();
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
localStorage.setItem("USER_EMAIL", "");
|
|
307
317
|
window.location.href = "/login";
|
|
308
318
|
}
|
|
309
319
|
|
|
@@ -437,6 +447,7 @@ var useLogin = function useLogin() {
|
|
|
437
447
|
amplitude.getInstance().logEvent("general: session start", {
|
|
438
448
|
user_id: data.email
|
|
439
449
|
});
|
|
450
|
+
localStorage.setItem("USER_EMAIL", data.email);
|
|
440
451
|
|
|
441
452
|
if (isLoginFirst) {
|
|
442
453
|
amplitude.getInstance().logEvent("general: first login", {
|