mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 11:34:15 -05:00
8d25fb1131
[web] Use the Notification component for the managed account alert GitOrigin-RevId: 3839b171348bf0f670b6a033b99078b8543ce2e5
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { Trans, useTranslation } from 'react-i18next'
|
|
import getMeta from '@/utils/meta'
|
|
import Notification from '@/shared/components/notification'
|
|
|
|
export default function ManagedAccountAlert() {
|
|
const { t } = useTranslation()
|
|
const isManaged = getMeta('ol-isManagedAccount', false)
|
|
const currentManagedUserAdminEmail: string = getMeta(
|
|
'ol-currentManagedUserAdminEmail',
|
|
''
|
|
)
|
|
|
|
if (!isManaged) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<Notification
|
|
type="info"
|
|
content={
|
|
<>
|
|
<div>
|
|
<strong>
|
|
{t('account_managed_by_group_administrator', {
|
|
admin: currentManagedUserAdminEmail,
|
|
})}
|
|
</strong>
|
|
</div>
|
|
<Trans
|
|
i18nKey="need_contact_group_admin_to_make_changes"
|
|
components={[
|
|
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
|
<a
|
|
href="/learn/how-to/Understanding_Managed_Overleaf_Accounts"
|
|
target="_blank"
|
|
/>,
|
|
]}
|
|
/>
|
|
</>
|
|
}
|
|
/>
|
|
)
|
|
}
|