mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
[web] Fix AI quota paywall upgrade CTA to use interstitial page (#33376)
* Update hrefs * Revert link on expired subscriptions * Revert hrefs of other buttons * Use `plans-2026-phase-1` feature flag GitOrigin-RevId: 3fe489c6ec192adc2fb836b07429dc2a11f9a57f
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import * as eventTracking from '../../../../infrastructure/event-tracking'
|
||||
import OLButton from '@/shared/components/ol/ol-button'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
|
||||
export default function UpgradeButton({
|
||||
className = '',
|
||||
@@ -12,6 +13,7 @@ export default function UpgradeButton({
|
||||
source?: string
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
const plans2026 = useFeatureFlag('plans-2026-phase-1')
|
||||
|
||||
function handleClick() {
|
||||
eventTracking.send('subscription-funnel', source, 'upgrade')
|
||||
@@ -23,7 +25,11 @@ export default function UpgradeButton({
|
||||
<OLButton
|
||||
variant="premium"
|
||||
size="sm"
|
||||
href={`/user/subscription/plans?itm_referrer=${referrer}`}
|
||||
href={
|
||||
plans2026
|
||||
? `/user/subscription/choose-your-plan?itm_referrer=${referrer}`
|
||||
: `/user/subscription/plans?itm_referrer=${referrer}`
|
||||
}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
onClick={handleClick}
|
||||
|
||||
@@ -22,7 +22,12 @@ export function ExpiredSubscription({
|
||||
>
|
||||
{t('view_your_invoices')}
|
||||
</OLButton>
|
||||
<OLButton href="/user/subscription/plans" variant="primary">
|
||||
<OLButton
|
||||
// We need to send users to the public plans page because the
|
||||
// choose-your-plan still redirects them away in this expired state
|
||||
href="/user/subscription/plans"
|
||||
variant="primary"
|
||||
>
|
||||
{t('create_new_subscription')}
|
||||
</OLButton>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user