2024-06-20 12:59:19 -04:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2022-09-21 06:02:37 -04:00
|
|
|
import { useUserContext } from '../../../shared/context/user-context'
|
|
|
|
|
|
|
|
function LabsProgramSection() {
|
|
|
|
const { t } = useTranslation()
|
2024-06-27 08:46:20 -04:00
|
|
|
const { labsProgram } = useUserContext()
|
2024-06-20 12:59:19 -04:00
|
|
|
|
|
|
|
const labsStatusText = labsProgram
|
|
|
|
? t('youre_a_member_of_overleaf_labs')
|
|
|
|
: t('get_exclusive_access_to_labs')
|
|
|
|
const labsRedirectText = labsProgram
|
|
|
|
? t('view_labs_experiments')
|
|
|
|
: t('join_overleaf_labs')
|
2022-09-21 06:02:37 -04:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<h3>{t('overleaf_labs')}</h3>
|
2024-06-20 12:59:19 -04:00
|
|
|
|
|
|
|
<p className="small">{labsStatusText}</p>
|
|
|
|
|
|
|
|
<a href="/labs/participate">{labsRedirectText}</a>
|
|
|
|
<hr />
|
2022-09-21 06:02:37 -04:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LabsProgramSection
|