Просмотр исходного кода

Merge pull request #28467 from overleaf/mj-ignore-new-user-date

[web] Add flag to ignore new user cutoff date

GitOrigin-RevId: 4faca9de9e8d22d543613124390185915d42cb67
Mathias Jakobsen 1 год назад
Родитель
Сommit
ffc808f8c9

+ 4 - 0
services/web/frontend/js/features/ide-redesign/utils/new-editor-utils.ts

@@ -2,10 +2,14 @@ import { useUserSettingsContext } from '@/shared/context/user-settings-context'
 import getMeta from '@/utils/meta'
 import { isSplitTestEnabled, getSplitTestVariant } from '@/utils/splitTestUtils'
 
+export const ignoringUserCutoffDate =
+  new URLSearchParams(window.location.search).get('skip-new-user-check') ===
+  'true'
 // TODO: change this when we have a launch date
 const NEW_USER_CUTOFF_DATE = new Date('2100-01-01')
 
 export const isNewUser = () => {
+  if (ignoringUserCutoffDate) return true
   const user = getMeta('ol-user')
 
   if (!user.signUpDate) return false