overleaf/services/web/frontend/js/features/editor-left-menu/components/help-contact-us.tsx
M Fahru a30e934692 Migrate "help menu" in editor left menu to react
GitOrigin-RevId: 7ebbfa693205de1f57b1d54e25c46cfb1851acc8
2022-11-03 09:03:49 +00:00

24 lines
668 B
TypeScript

import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import ContactUsModal from '../../../../../modules/support/frontend/js/components/contact-us-modal'
import LeftMenuButton from './left-menu-button'
export default function HelpContactUs() {
const [showModal, setShowModal] = useState(false)
const { t } = useTranslation()
return (
<>
<LeftMenuButton
onClick={() => setShowModal(true)}
icon={{
type: 'question',
fw: true,
}}
>
{t('contact_us')}
</LeftMenuButton>
<ContactUsModal show={showModal} handleHide={() => setShowModal(false)} />
</>
)
}