2
0

NotFoundPage.jsx 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React, { useMemo } from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withTranslation } from 'react-i18next';
  4. import PageListIcon from './Icons/PageListIcon';
  5. import TimeLineIcon from './Icons/TimeLineIcon';
  6. import CustomNavAndContents from './CustomNavigation/CustomNavAndContents';
  7. import PageList from './PageList';
  8. import PageTimeline from './PageTimeline';
  9. const NotFoundPage = (props) => {
  10. const { t } = props;
  11. const navTabMapping = useMemo(() => {
  12. return {
  13. pagelist: {
  14. Icon: PageListIcon,
  15. Content: PageList,
  16. i18n: t('page_list'),
  17. index: 0,
  18. },
  19. timeLine: {
  20. Icon: TimeLineIcon,
  21. Content: PageTimeline,
  22. i18n: t('Timeline View'),
  23. index: 1,
  24. },
  25. };
  26. }, [t]);
  27. return (
  28. <div className="mt-5 d-edit-none">
  29. <CustomNavAndContents navTabMapping={navTabMapping} />
  30. </div>
  31. );
  32. };
  33. NotFoundPage.propTypes = {
  34. t: PropTypes.func.isRequired, // i18next
  35. };
  36. export default withTranslation()(NotFoundPage);