mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
* Remove `plans-2026-phase-1` from frontend in subscriptions module * Remove `plans-2026-phase-1` from general frontend * Remove empty `AiErrorAssistantPaywall` * Simplify `UpgradeNotification` * Update translations * Fix tests * Remove `OverleafAssistPaywall` * Remove unused locales GitOrigin-RevId: 4cf04bbde134a3f7b778a0695d388f31d9765343
37 lines
976 B
TypeScript
37 lines
976 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import * as eventTracking from '../../../../infrastructure/event-tracking'
|
|
import OLButton from '@/shared/components/ol/ol-button'
|
|
|
|
export default function UpgradeButton({
|
|
className = '',
|
|
referrer = 'editor-header-upgrade-prompt',
|
|
source = 'code-editor',
|
|
}: {
|
|
className?: string
|
|
referrer?: string
|
|
source?: string
|
|
}) {
|
|
const { t } = useTranslation()
|
|
|
|
function handleClick() {
|
|
eventTracking.send('subscription-funnel', source, 'upgrade')
|
|
eventTracking.sendMB('upgrade-button-click', { source })
|
|
}
|
|
|
|
return (
|
|
<div className="ide-redesign-toolbar-button-container">
|
|
<OLButton
|
|
variant="premium"
|
|
size="sm"
|
|
href={`/user/subscription/choose-your-plan?itm_referrer=${referrer}&paywall-type=${source}`}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
onClick={handleClick}
|
|
className={className}
|
|
>
|
|
{t('upgrade')}
|
|
</OLButton>
|
|
</div>
|
|
)
|
|
}
|