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