Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/web/src/constants/experimentsConstants.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/web/src/pages/auth/components/QuestionnaireForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ import { ROUTES } from '../../../constants/routes.enum';
import { DynamicCheckBox } from './dynamic-checkbox/DynamicCheckBox';
import styled from '@emotion/styled/macro';
import { useDomainParser } from './useDomainHook';
import { OnboardingExperimentV2ModalKey } from '../../../constants/experimentsConstants';

export function QuestionnaireForm() {
const [loading, setLoading] = useState<boolean>();
const {
handleSubmit,
formState: { errors },
control,
setError,
} = useForm<IOrganizationCreateForm>({});
const navigate = useNavigate();
const { setToken, token } = useAuthContext();
Expand Down Expand Up @@ -69,7 +67,6 @@ export function QuestionnaireForm() {
const createDto: ICreateOrganizationDto = { ...rest, name: organizationName };
const organization = await createOrganizationMutation(createDto);
const organizationResponseToken = await api.post(`/v1/auth/organizations/${organization._id}/switch`, {});
localStorage.setItem(OnboardingExperimentV2ModalKey, 'true');
setToken(organizationResponseToken);
}

Expand Down

This file was deleted.

11 changes: 2 additions & 9 deletions apps/web/src/pages/quick-start/steps/GetStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import { ChannelsConfiguration } from '../components/ChannelsConfiguration';
import { GetStartedLayout } from '../components/layout/GetStartedLayout';
import { NavButton } from '../components/NavButton';
import { getStartedSteps, OnBoardingAnalyticsEnum } from '../consts';
import { OnboardingExperimentModal } from '../components/OnboardingExperimentModal';
import { useAuthContext } from '@novu/shared-web';
import { OnboardingExperimentV2ModalKey } from '../../../constants/experimentsConstants';

const ChannelsConfigurationHolder = styled.div`
display: flex;
Expand All @@ -28,20 +25,17 @@ const ChannelsConfigurationHolder = styled.div`

export function GetStarted() {
const segment = useSegment();
const { currentOrganization } = useAuthContext();

const [clickedChannel, setClickedChannel] = useState<{
open: boolean;
channelType?: ChannelTypeEnum;
}>({ open: false });

const isOnboardingModalEnabled =
localStorage.getItem(OnboardingExperimentV2ModalKey) === 'true' && window.innerWidth > 768;

const onIntegrationModalClose = () => setClickedChannel({ open: false });

useEffect(() => {
segment.track(OnBoardingAnalyticsEnum.CONFIGURE_PROVIDER_VISIT);
}, [currentOrganization?._id, isOnboardingModalEnabled, segment]);
}, [segment]);

function handleOnClick() {
segment.track(OnBoardingAnalyticsEnum.CONFIGURE_PROVIDER_NAVIGATION_NEXT_PAGE_CLICK);
Expand All @@ -67,7 +61,6 @@ export function GetStarted() {
/>
<ChannelsConfiguration setClickedChannel={setClickedChannel} />
</ChannelsConfigurationHolder>
{isOnboardingModalEnabled && <OnboardingExperimentModal />}
</GetStartedLayout>
);
}
Expand Down