ForbiddenPage.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React, { type JSX } from 'react';
  2. import { useTranslation } from 'next-i18next';
  3. type Props = {
  4. isLinkSharingDisabled?: boolean;
  5. };
  6. const ForbiddenPage = React.memo((props: Props): JSX.Element => {
  7. const { t } = useTranslation();
  8. return (
  9. <>
  10. <div className="row not-found-message-row mb-4">
  11. <div className="col-lg-12">
  12. <h2 className="text-muted">
  13. <span className="material-symbols-outlined" aria-hidden="true">
  14. block
  15. </span>
  16. {t('Forbidden')}
  17. </h2>
  18. </div>
  19. </div>
  20. <div className="row row-alerts d-edit-none">
  21. <div className="col-sm-12">
  22. <p className="alert alert-primary py-3 px-4">
  23. <span className="material-symbols-outlined" aria-hidden="true">
  24. lock
  25. </span>
  26. {props.isLinkSharingDisabled
  27. ? t('share_links.link_sharing_is_disabled')
  28. : t('Browsing of this page is restricted')}
  29. </p>
  30. </div>
  31. </div>
  32. </>
  33. );
  34. });
  35. ForbiddenPage.displayName = 'ForbiddenPage';
  36. export default ForbiddenPage;