[cm6] add tracking to figure modal submit events (#13917)

GitOrigin-RevId: f0c755e2f336b5f0c6caf283bed69db65a0c3c92
This commit is contained in:
Domagoj Kriskovic 2023-07-18 12:25:54 +02:00 committed by Copybot
parent 79f07e5626
commit 4d3c4c6ae9

View file

@ -6,6 +6,7 @@ import {
import Icon from '../../../../shared/components/icon'
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import { sendMB } from '../../../../infrastructure/event-tracking'
export const FigureModalFooter: FC<{
onInsert: () => void
@ -91,7 +92,10 @@ const FigureModalAction: FC<{
bsStyle={null}
className="btn-success"
type="button"
onClick={onInsert}
onClick={() => {
onInsert()
sendMB('figure-modal-edit')
}}
>
{t('done')}
</Button>
@ -104,7 +108,10 @@ const FigureModalAction: FC<{
className="btn-success"
type="button"
disabled={getPath === undefined}
onClick={onInsert}
onClick={() => {
onInsert()
sendMB('figure-modal-insert')
}}
>
{t('insert_figure')}
</Button>