managed-account-alert.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Trans, useTranslation } from 'react-i18next'
  2. import getMeta from '@/utils/meta'
  3. import Notification from '@/shared/components/notification'
  4. export default function ManagedAccountAlert() {
  5. const { t } = useTranslation()
  6. const isManaged = getMeta('ol-isManagedAccount')
  7. const currentManagedUserAdminEmail = getMeta(
  8. 'ol-currentManagedUserAdminEmail'
  9. )
  10. if (!isManaged) {
  11. return null
  12. }
  13. return (
  14. <Notification
  15. type="info"
  16. content={
  17. <>
  18. <div>
  19. <strong>
  20. {t('account_managed_by_group_administrator', {
  21. admin: currentManagedUserAdminEmail,
  22. })}
  23. </strong>
  24. </div>
  25. <Trans
  26. i18nKey="need_contact_group_admin_to_make_changes"
  27. components={[
  28. // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
  29. <a
  30. href="/learn/how-to/Understanding_Managed_Overleaf_Accounts"
  31. target="_blank"
  32. />,
  33. ]}
  34. />
  35. </>
  36. }
  37. />
  38. )
  39. }