2023-10-30 06:29:56 -04:00
|
|
|
import { Trans, useTranslation } from 'react-i18next'
|
2023-07-10 05:21:49 -04:00
|
|
|
import getMeta from '../../../utils/meta'
|
|
|
|
|
|
|
|
export default function ManagedAccountAlert() {
|
2023-10-30 06:29:56 -04:00
|
|
|
const { t } = useTranslation()
|
2023-07-10 05:21:49 -04:00
|
|
|
const isManaged = getMeta('ol-isManagedAccount', false)
|
2023-08-09 14:50:19 -04:00
|
|
|
const currentManagedUserAdminEmail: string = getMeta(
|
|
|
|
'ol-currentManagedUserAdminEmail',
|
|
|
|
''
|
|
|
|
)
|
2023-07-10 05:21:49 -04:00
|
|
|
|
|
|
|
if (!isManaged) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="enrollment-alert">
|
|
|
|
<div className="icon">
|
|
|
|
<span className="info-badge" />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
2023-08-09 14:50:19 -04:00
|
|
|
<strong>
|
2023-10-30 06:29:56 -04:00
|
|
|
{t('account_managed_by_group_administrator', {
|
|
|
|
admin: currentManagedUserAdminEmail,
|
|
|
|
})}
|
2023-08-09 14:50:19 -04:00
|
|
|
</strong>
|
2023-07-10 05:21:49 -04:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<Trans
|
|
|
|
i18nKey="need_contact_group_admin_to_make_changes"
|
2023-08-23 14:26:59 -04:00
|
|
|
components={[
|
|
|
|
<a href="/learn/how-to/Understanding_Managed_Overleaf_Accounts" />, // eslint-disable-line jsx-a11y/anchor-has-content, react/jsx-key
|
|
|
|
]}
|
2023-07-10 05:21:49 -04:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|