@iblai/web-utils 1.1.17 → 1.1.18

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
@@ -3170,7 +3170,7 @@ const useTenantContext = () => React.useContext(TenantContext);
3170
3170
  * 4. Handles tenant-specific domain redirects
3171
3171
  * 5. Maintains tenant access state
3172
3172
  */
3173
- function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed = false, setUseMentorProvider, skip = false, onLoadPlatformPermissions, }) {
3173
+ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed = false, setUseMentorProvider, skip = false, onLoadPlatformPermissions, skipCustomDomainCheck = false, }) {
3174
3174
  // If skip is true, just return children without any provider logic
3175
3175
  if (skip) {
3176
3176
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
@@ -3187,7 +3187,7 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
3187
3187
  const [metadata, setMetadata] = React.useState({});
3188
3188
  // Fetch custom domain to get platform_key
3189
3189
  const currentDomain = typeof window !== "undefined" ? window.location.hostname : "";
3190
- const { data: customDomainData, isLoading: isLoadingCustomDomain, isError: isCustomDomainError, } = dataLayer.useGetCustomDomainsQuery({ params: { domain: currentDomain } }, { skip: !isWeb() || !currentDomain });
3190
+ const { data: customDomainData, isLoading: isLoadingCustomDomain, isError: isCustomDomainError, } = dataLayer.useGetCustomDomainsQuery({ params: { domain: currentDomain } }, { skip: !isWeb() || !currentDomain || skipCustomDomainCheck });
3191
3191
  // Extract platform_key from custom domain response to use as requestedTenant
3192
3192
  const { customDomainPlatformKey, isAdvertisingTenant } = React.useMemo(() => {
3193
3193
  let platformKey;