mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
b2e74464a2
editor events GitOrigin-RevId: 8d74576d4f8117ecca47402afcc9cee229dd0dca
30 lines
786 B
TypeScript
30 lines
786 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { useCallback } from 'react'
|
|
import * as eventTracking from '../../../infrastructure/event-tracking'
|
|
import { useContactUsModal } from '../../../shared/hooks/use-contact-us-modal'
|
|
import LeftMenuButton from './left-menu-button'
|
|
|
|
export default function HelpContactUs() {
|
|
const { modal, showModal } = useContactUsModal()
|
|
const { t } = useTranslation()
|
|
|
|
const showModalWithAnalytics = useCallback(() => {
|
|
eventTracking.sendMB('left-menu-contact')
|
|
showModal()
|
|
}, [showModal])
|
|
|
|
return (
|
|
<>
|
|
<LeftMenuButton
|
|
onClick={showModalWithAnalytics}
|
|
icon={{
|
|
type: 'question',
|
|
fw: true,
|
|
}}
|
|
>
|
|
{t('contact_us')}
|
|
</LeftMenuButton>
|
|
{modal}
|
|
</>
|
|
)
|
|
}
|