From 3aa85df34ab8c78399191c987a35618e8b14015b Mon Sep 17 00:00:00 2001 From: David <33458145+davidmcpowell@users.noreply.github.com> Date: Mon, 22 Sep 2025 10:05:45 +0100 Subject: [PATCH] Merge pull request #28604 from overleaf/mj-limit-beta-modal [web] Remove beta modal for new-user-split-test groups GitOrigin-RevId: d61a3338472608620d199ef3ee7ef028e90f5aa0 --- .../ide-redesign/components/switcher-modal/beta-modal.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/ide-redesign/components/switcher-modal/beta-modal.tsx b/services/web/frontend/js/features/ide-redesign/components/switcher-modal/beta-modal.tsx index bd1c363eba..616b7eb9f3 100644 --- a/services/web/frontend/js/features/ide-redesign/components/switcher-modal/beta-modal.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/switcher-modal/beta-modal.tsx @@ -10,6 +10,7 @@ import { FC, useCallback, useEffect } from 'react' import { canUseNewEditor, useIsNewEditorEnabled, + useIsNewEditorEnabledViaPrimaryFeatureFlag, } from '../../utils/new-editor-utils' import Notification from '@/shared/components/notification' import { useSwitchEnableNewEditorState } from '../../hooks/use-switch-enable-new-editor-state' @@ -30,14 +31,15 @@ export const IdeRedesignIntroModal: FC = () => { name: TUTORIAL_KEY, } ) + const hasAccess = useIsNewEditorEnabledViaPrimaryFeatureFlag() useEffect(() => { + if (!hasAccess) return if (!inactiveTutorials.includes(TUTORIAL_KEY)) { tryShowingPopup() } - }, [tryShowingPopup, inactiveTutorials]) + }, [tryShowingPopup, inactiveTutorials, hasAccess]) - const hasAccess = canUseNewEditor() if (!hasAccess) { return null }