editor-over-limit-modal-content.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { useTranslation } from 'react-i18next'
  2. import { linkSharingEnforcementDate } from '../utils/link-sharing'
  3. import { sendMB } from '@/infrastructure/event-tracking'
  4. import OLButton from '@/features/ui/components/ol/ol-button'
  5. import {
  6. OLModalBody,
  7. OLModalFooter,
  8. OLModalHeader,
  9. OLModalTitle,
  10. } from '@/features/ui/components/ol/ol-modal'
  11. type EditorOverLimitModalContentProps = {
  12. handleHide: () => void
  13. }
  14. export default function EditorOverLimitModalContent({
  15. handleHide,
  16. }: EditorOverLimitModalContentProps) {
  17. const { t } = useTranslation()
  18. return (
  19. <>
  20. <OLModalHeader closeButton>
  21. <OLModalTitle>{t('do_you_need_edit_access')}</OLModalTitle>
  22. </OLModalHeader>
  23. <OLModalBody>
  24. <p>
  25. {t('this_project_has_more_than_max_collabs', {
  26. linkSharingDate: linkSharingEnforcementDate,
  27. })}
  28. </p>
  29. <p>{t('to_keep_edit_access')}</p>
  30. </OLModalBody>
  31. <OLModalFooter>
  32. <OLButton
  33. variant="secondary"
  34. href="/blog/changes-to-project-sharing"
  35. target="_blank"
  36. rel="noreferrer"
  37. onClick={() => {
  38. sendMB('notification-click', {
  39. name: 'link-sharing-collaborator-limit',
  40. button: 'learn',
  41. })
  42. }}
  43. >
  44. {t('learn_more')}
  45. </OLButton>
  46. <OLButton
  47. variant="primary"
  48. onClick={() => {
  49. sendMB('notification-click', {
  50. name: 'link-sharing-collaborator-limit',
  51. button: 'ok',
  52. })
  53. handleHide()
  54. }}
  55. >
  56. {t('ok')}
  57. </OLButton>
  58. </OLModalFooter>
  59. </>
  60. )
  61. }