NotFoundPage.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import React, { useMemo, type JSX } from 'react';
  2. import { useTranslation } from 'next-i18next';
  3. import CustomNavAndContents from './CustomNavigation/CustomNavAndContents';
  4. import { DescendantsPageList } from './DescendantsPageList';
  5. import { PageTimeline } from './PageTimeline';
  6. type NotFoundPageProps = {
  7. path: string,
  8. }
  9. const NotFoundPage = (props: NotFoundPageProps): JSX.Element => {
  10. const { t } = useTranslation();
  11. const { path } = props;
  12. const navTabMapping = useMemo(() => {
  13. return {
  14. pagelist: {
  15. Icon: () => <span className="material-symbols-outlined">subject</span>,
  16. Content: () => <DescendantsPageList path={path} />,
  17. i18n: t('page_list'),
  18. },
  19. timeLine: {
  20. Icon: () => <span className="material-symbols-outlined">timeline</span>,
  21. Content: PageTimeline,
  22. i18n: t('Timeline View'),
  23. },
  24. };
  25. }, [path, t]);
  26. return (
  27. <div className="d-edit-none">
  28. <CustomNavAndContents navTabMapping={navTabMapping} tabContentClasses={['py-4']} />
  29. </div>
  30. );
  31. };
  32. export default NotFoundPage;