mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #35158 from overleaf/oa-compile-timeout-final
[web] Compile timeout CTA GitOrigin-RevId: f64c651332a32c293da1f3256cf9443413878d63
This commit is contained in:
+5
-20
@@ -8,7 +8,7 @@ import getMeta from '@/utils/meta'
|
||||
import { populateEditorRedesignSegmentation } from '@/shared/hooks/use-editor-analytics'
|
||||
import CompileTimeoutPaywallModal from '@/features/pdf-preview/components/compile-timeout-paywall-modal'
|
||||
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
|
||||
import { useSplitTest } from '@/shared/context/split-test-context'
|
||||
import { useUserContext } from '@/shared/context/user-context'
|
||||
|
||||
function TimeoutUpgradePromptNew() {
|
||||
const { isProjectOwner } = useDetachCompileContext()
|
||||
@@ -61,27 +61,12 @@ const CompileTimeout = memo(function CompileTimeout({
|
||||
isCompileTimeoutTargetPlansEnabled,
|
||||
}: CompileTimeoutProps) {
|
||||
const { t } = useTranslation()
|
||||
const { variant } = useSplitTest('compile-timeout-cta')
|
||||
const user = useUserContext()
|
||||
|
||||
let ctaLabel = ''
|
||||
let ctaLabel = user.allowedFreeTrial
|
||||
? t('start_free_trial')
|
||||
: t('subscribe_now')
|
||||
|
||||
switch (variant) {
|
||||
case 'explore-plans':
|
||||
ctaLabel = t('explore_plans')
|
||||
break
|
||||
case 'get-more-compile-time':
|
||||
ctaLabel = t('get_more_compile_time')
|
||||
break
|
||||
case 'upgrade-now':
|
||||
ctaLabel = t('upgrade_now')
|
||||
break
|
||||
case 'subscribe-now':
|
||||
ctaLabel = t('subscribe_now')
|
||||
break
|
||||
default:
|
||||
ctaLabel = t('start_free_trial')
|
||||
break
|
||||
}
|
||||
const extraSearchParams = useMemo(() => {
|
||||
return {
|
||||
itm_content: 'new-editor',
|
||||
|
||||
Reference in New Issue
Block a user