2023-10-30 06:29:56 -04:00
|
|
|
import { Trans, useTranslation } from 'react-i18next'
|
2024-05-22 07:17:33 -04:00
|
|
|
import getMeta from '@/utils/meta'
|
|
|
|
import Notification from '@/shared/components/notification'
|
2023-07-10 05:21:49 -04:00
|
|
|
|
|
|
|
export default function ManagedAccountAlert() {
|
2023-10-30 06:29:56 -04:00
|
|
|
const { t } = useTranslation()
|
2024-06-18 06:01:37 -04:00
|
|
|
const isManaged = getMeta('ol-isManagedAccount')
|
|
|
|
const currentManagedUserAdminEmail = getMeta(
|
|
|
|
'ol-currentManagedUserAdminEmail'
|
2023-08-09 14:50:19 -04:00
|
|
|
)
|
2023-07-10 05:21:49 -04:00
|
|
|
|
|
|
|
if (!isManaged) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2024-05-22 07:17:33 -04:00
|
|
|
<Notification
|
|
|
|
type="info"
|
|
|
|
content={
|
|
|
|
<>
|
|
|
|
<div>
|
|
|
|
<strong>
|
|
|
|
{t('account_managed_by_group_administrator', {
|
|
|
|
admin: currentManagedUserAdminEmail,
|
|
|
|
})}
|
|
|
|
</strong>
|
|
|
|
</div>
|
2023-07-10 05:21:49 -04:00
|
|
|
<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
|
|
|
/>
|
2024-05-22 07:17:33 -04:00
|
|
|
</>
|
|
|
|
}
|
|
|
|
/>
|
2023-07-10 05:21:49 -04:00
|
|
|
)
|
|
|
|
}
|