2023-08-09 14:50:19 -04:00
|
|
|
import { Trans } from 'react-i18next'
|
2023-07-10 05:21:49 -04:00
|
|
|
import getMeta from '../../../utils/meta'
|
|
|
|
|
|
|
|
export default function ManagedAccountAlert() {
|
|
|
|
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>
|
|
|
|
<Trans
|
|
|
|
i18nKey="account_managed_by_group_administrator"
|
|
|
|
values={{
|
|
|
|
admin: currentManagedUserAdminEmail,
|
|
|
|
}}
|
2023-10-19 04:27:45 -04:00
|
|
|
shouldUnescape
|
|
|
|
tOptions={{ interpolation: { escapeValue: true } }}
|
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>
|
|
|
|
)
|
|
|
|
}
|