overleaf/services/web/frontend/js/features/settings/components/labs-program-section.tsx
Alf Eaton 7755203ff7 Enable ESLint rule that enforces t when preferable to Trans (#15253)
GitOrigin-RevId: d11b3f587b462d400a8d68128dc8be342415bf7d
2023-10-20 08:03:34 +00:00

27 lines
789 B
TypeScript

import { Trans, useTranslation } from 'react-i18next'
import { useUserContext } from '../../../shared/context/user-context'
function LabsProgramSection() {
const { t } = useTranslation()
const { labsProgram } = useUserContext()
return (
<>
<h3>{t('overleaf_labs')}</h3>
{labsProgram ? null : (
<p className="small">
{/* eslint-disable-next-line react/jsx-key */}
<Trans i18nKey="labs_program_benefits" components={[<span />]} />
</p>
)}
<p className="small">
{labsProgram
? t('labs_program_already_participating')
: t('labs_program_not_participating')}
</p>
<a href="/labs/participate">{t('manage_labs_program_membership')}</a>
</>
)
}
export default LabsProgramSection