mario-core 2.9.313-release → 2.9.314-release

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 CHANGED
@@ -38413,6 +38413,7 @@ var useLogin = function useLogin() {
38413
38413
  var params = new URLSearchParams(location.search);
38414
38414
  var loginClassLink = params.get("type") === "classlink";
38415
38415
  var tokenClassLink = params.get("token");
38416
+ var isAdminUser = params.get("isAdminUser");
38416
38417
 
38417
38418
  var _useState4 = React.useState(false),
38418
38419
  openModelAssign = _useState4[0];
@@ -38446,12 +38447,16 @@ var useLogin = function useLogin() {
38446
38447
  localStorage.setItem(ACCESS_TOKEN, authToken);
38447
38448
  document.cookie = "auth-token=;domain=" + (domain.includes("localhost") ? domain : ".marioforme.com") + "; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
38448
38449
  document.cookie = "redirect-uri=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
38450
+
38451
+ if (!!isAdminUser) {
38452
+ return history.push("/admin/home");
38453
+ }
38449
38454
  }
38450
38455
 
38451
38456
  var token = getAccessToken();
38452
38457
  if (!!token) history.push("/");
38453
38458
  getInfoGoogle();
38454
- }, []);
38459
+ }, [isAdminUser]);
38455
38460
 
38456
38461
  var handleCancelModelAssign = function handleCancelModelAssign() {
38457
38462
  localStorage.removeItem(ACCESS_TOKEN);