mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
Merge pull request #28467 from overleaf/mj-ignore-new-user-date
[web] Add flag to ignore new user cutoff date GitOrigin-RevId: 4faca9de9e8d22d543613124390185915d42cb67
This commit is contained in:
committed by
Copybot
parent
2ad17039f1
commit
614ddca656
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user