ForbiddenPage.tsx 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import React 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">block</span>
  14. Forbidden
  15. </h2>
  16. </div>
  17. </div>
  18. <div className="row row-alerts d-edit-none">
  19. <div className="col-sm-12">
  20. <p className="alert alert-primary py-3 px-4">
  21. <span className="material-symbols-outlined" aria-hidden="true">lock</span>
  22. { props.isLinkSharingDisabled ? t('share_links.link_sharing_is_disabled') : t('Browsing of this page is restricted')}
  23. </p>
  24. </div>
  25. </div>
  26. </>
  27. );
  28. });
  29. ForbiddenPage.displayName = 'ForbiddenPage';
  30. export default ForbiddenPage;