labs-program-section.tsx 789 B

123456789101112131415161718192021222324252627
  1. import { Trans, useTranslation } from 'react-i18next'
  2. import { useUserContext } from '../../../shared/context/user-context'
  3. function LabsProgramSection() {
  4. const { t } = useTranslation()
  5. const { labsProgram } = useUserContext()
  6. return (
  7. <>
  8. <h3>{t('overleaf_labs')}</h3>
  9. {labsProgram ? null : (
  10. <p className="small">
  11. {/* eslint-disable-next-line react/jsx-key */}
  12. <Trans i18nKey="labs_program_benefits" components={[<span />]} />
  13. </p>
  14. )}
  15. <p className="small">
  16. {labsProgram
  17. ? t('labs_program_already_participating')
  18. : t('labs_program_not_participating')}
  19. </p>
  20. <a href="/labs/participate">{t('manage_labs_program_membership')}</a>
  21. </>
  22. )
  23. }
  24. export default LabsProgramSection