overleaf/services/web/frontend/js/features/settings/components/managed-account-alert.tsx
Alf Eaton 221d16f4e4 Disable transSupportBasicHtmlNodes in react-i18next config (#15430)
* Set transSupportBasicHtmlNodes to false
* Update ESLint rule
* Convert Trans to t
* Convert shouldUnescape={true}
* Convert some arrays to objects
* Update translations

GitOrigin-RevId: 64a50318388abcada408f72d949de148129a9f63
2023-10-31 09:04:04 +00:00

40 lines
1 KiB
TypeScript

import { Trans, useTranslation } from 'react-i18next'
import getMeta from '../../../utils/meta'
export default function ManagedAccountAlert() {
const { t } = useTranslation()
const isManaged = getMeta('ol-isManagedAccount', false)
const currentManagedUserAdminEmail: string = getMeta(
'ol-currentManagedUserAdminEmail',
''
)
if (!isManaged) {
return null
}
return (
<div className="enrollment-alert">
<div className="icon">
<span className="info-badge" />
</div>
<div>
<div>
<strong>
{t('account_managed_by_group_administrator', {
admin: currentManagedUserAdminEmail,
})}
</strong>
</div>
<div>
<Trans
i18nKey="need_contact_group_admin_to_make_changes"
components={[
<a href="/learn/how-to/Understanding_Managed_Overleaf_Accounts" />, // eslint-disable-line jsx-a11y/anchor-has-content, react/jsx-key
]}
/>
</div>
</div>
</div>
)
}