acsi-core 1.2.18 → 1.2.21
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 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2495,7 +2495,17 @@ var useLogin = function useLogin(onNavigate, trackEvent) {
|
|
|
2495
2495
|
timestamp: new Date().toISOString()
|
|
2496
2496
|
}
|
|
2497
2497
|
});
|
|
2498
|
-
|
|
2498
|
+
var isRootDomain = window.location.hostname === REQUEST_ORIGIN || window.location.hostname === "www." + REQUEST_ORIGIN;
|
|
2499
|
+
if (isRootDomain) {
|
|
2500
|
+
var _data$data$roles;
|
|
2501
|
+
var domain = TEACHER_ORIGIN;
|
|
2502
|
+
if ((_data$data$roles = data.data.roles) !== null && _data$data$roles !== void 0 && _data$data$roles.includes("Admin")) {
|
|
2503
|
+
domain = ADMIN_ORIGIN;
|
|
2504
|
+
}
|
|
2505
|
+
window.location.href = domain + "/dashboard";
|
|
2506
|
+
} else {
|
|
2507
|
+
onNavigate("/dashboard");
|
|
2508
|
+
}
|
|
2499
2509
|
} else {
|
|
2500
2510
|
toast.error("The code is not correct. Please check again.");
|
|
2501
2511
|
}
|