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={[
|
2024-02-05 10:24:01 -05:00
|
|
|
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
|
|
|
<a
|
|
|
|
href="/learn/how-to/Understanding_Managed_Overleaf_Accounts"
|
|
|
|
target="_blank"
|
|
|
|
/>,
|
2023-08-23 14:26:59 -04:00
|
|
|
]}
|
2023-07-10 05:21:49 -04:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|