overleaf/services/web/frontend/js/features/editor-navigation-toolbar/components/upgrade-prompt.jsx
ilkin-overleaf 86689a6269 Merge pull request #20205 from overleaf/ii-bs5-ide-header
[web] BS5 ide page header

GitOrigin-RevId: b7aad221d458d8403d60ff9950129394c74af856
2024-09-04 08:06:00 +00:00

32 lines
909 B
JavaScript

import { useTranslation } from 'react-i18next'
import * as eventTracking from '../../../infrastructure/event-tracking'
import OLButton from '@/features/ui/components/ol/ol-button'
import { bsVersion } from '@/features/utils/bootstrap-5'
import classnames from 'classnames'
function UpgradePrompt() {
const { t } = useTranslation()
function handleClick(e) {
eventTracking.send('subscription-funnel', 'code-editor', 'upgrade')
eventTracking.sendMB('upgrade-button-click', { source: 'code-editor' })
}
return (
<OLButton
variant="primary"
size="small"
className={classnames(
'toolbar-header-upgrade-prompt',
bsVersion({ bs3: 'btn-xs' })
)}
href="/user/subscription/plans?itm_referrer=editor-header-upgrade-prompt"
target="_blank"
onClick={handleClick}
>
{t('upgrade')}
</OLButton>
)
}
export default UpgradePrompt