mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-14 23:50:58 -05:00
f8efc3e2ae
[web] Implement the editor's left menu in Offcanvas GitOrigin-RevId: 999e995d664b1dc958f56643f05e95b8aa2d6290
31 lines
905 B
TypeScript
31 lines
905 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'
|
|
import { bsVersionIcon } from '@/features/utils/bootstrap-5'
|
|
|
|
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={bsVersionIcon({
|
|
bs5: { type: 'contact_support' },
|
|
bs3: { type: 'question', fw: true },
|
|
})}
|
|
>
|
|
{t('contact_us')}
|
|
</LeftMenuButton>
|
|
{modal}
|
|
</>
|
|
)
|
|
}
|