@iblai/web-utils 1.7.1 → 1.7.2

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.d.ts CHANGED
@@ -1002,7 +1002,7 @@ declare const isNode: () => string | false;
1002
1002
  declare const isExpo: () => any;
1003
1003
  declare const isTauri: () => boolean;
1004
1004
  declare function isSafariBrowser(): boolean;
1005
- declare const getPlatform: () => "web" | "react-native" | "node" | "unknown";
1005
+ declare const getPlatform: () => "react-native" | "web" | "node" | "unknown";
1006
1006
  declare const safeRequire: (moduleName: string) => any;
1007
1007
  declare const getNextNavigation: () => any;
1008
1008
 
package/dist/index.esm.js CHANGED
@@ -9864,9 +9864,8 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
9864
9864
  }
9865
9865
  }
9866
9866
  async function handleLoadTenantMetadata(tenantKey) {
9867
- var _a, _b;
9867
+ var _a;
9868
9868
  setIsLoading(true);
9869
- const MAIN_TENANT_KEY = "main";
9870
9869
  try {
9871
9870
  const data = await fetchTenantMetadata([
9872
9871
  {
@@ -9891,18 +9890,6 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
9891
9890
  const { data: tenants } = await fetchUserTenants();
9892
9891
  const enhancedTenants = await enhanceTenants(tenants, data);
9893
9892
  saveUserTenants(enhancedTenants);
9894
- // If we're in an advertising tenant and user has other tenants,
9895
- // switch to a non-advertising, non-main tenant
9896
- const isCurrentTenantAdvertising = ((_b = data.metadata) === null || _b === void 0 ? void 0 : _b.is_advertising) || isAdvertisingTenant;
9897
- if (isCurrentTenantAdvertising &&
9898
- enhancedTenants &&
9899
- enhancedTenants.length > 0) {
9900
- const nonAdvertisingTenant = enhancedTenants.find((t) => !t.is_advertising && t.key !== MAIN_TENANT_KEY);
9901
- if (nonAdvertisingTenant) {
9902
- handleTenantSwitch(nonAdvertisingTenant.key, false, false);
9903
- return;
9904
- }
9905
- }
9906
9893
  if (currentTenant && currentTenant !== tenantKey) {
9907
9894
  setTenantKey(data.platform_key);
9908
9895
  const userAlreadyInTenant = enhancedTenants === null || enhancedTenants === void 0 ? void 0 : enhancedTenants.find((t) => t.key === tenantKey);