Skip to content

Commit

Permalink
fix(web): opt-in for enterprise only
Browse files Browse the repository at this point in the history
  • Loading branch information
ChmaraX committed Nov 18, 2024
1 parent e7624c1 commit 427c23f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/web/src/components/layout/components/PrivatePageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import { IntercomProvider } from 'react-use-intercom';
import { css } from '@novu/novui/css';
import { EnvironmentEnum } from '@novu/shared';

import { BRIDGE_SYNC_SAMPLE_ENDPOINT, BRIDGE_ENDPOINTS_LEGACY_VERSIONS, INTERCOM_APP_ID } from '../../../config';
import {
BRIDGE_SYNC_SAMPLE_ENDPOINT,
BRIDGE_ENDPOINTS_LEGACY_VERSIONS,
INTERCOM_APP_ID,
IS_EE_AUTH_ENABLED,
} from '../../../config';
import { SpotLight } from '../../utils/Spotlight';
import { SpotLightProvider } from '../../providers/SpotlightProvider';
import { useEnvironment, useRedirectURL, useRouteScopes } from '../../../hooks';
Expand Down Expand Up @@ -63,7 +68,10 @@ export function PrivatePageLayout() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useOptInRedirect();
if (IS_EE_AUTH_ENABLED) {
// eslint-disable-next-line react-hooks/rules-of-hooks
useOptInRedirect();
}

return (
<SpotLightProvider>
Expand Down

0 comments on commit 427c23f

Please sign in to comment.