From 37e9093166e03eeafd3db98497d2bb67947fa5fd Mon Sep 17 00:00:00 2001 From: veselovnk Date: Thu, 27 Jun 2024 11:31:16 +0300 Subject: [PATCH] MSP-3523 add notFound page --- src/pages/NotFound/index.tsx | 21 +++++++++++++++++++++ src/routes/Routers/index.tsx | 29 ++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 src/pages/NotFound/index.tsx diff --git a/src/pages/NotFound/index.tsx b/src/pages/NotFound/index.tsx new file mode 100644 index 0000000..9d56d09 --- /dev/null +++ b/src/pages/NotFound/index.tsx @@ -0,0 +1,21 @@ +import { Button } from 'antd' +import { Layout } from 'isp-ui-kit' +import { useNavigate } from 'react-router-dom' + +import { routePaths } from '@routes/routePaths.ts' + + +const { NotFoundPage } = Layout + +const NotFound = () => { + const navigate = useNavigate() + return ( + + + + ) +} + +export default NotFound diff --git a/src/routes/Routers/index.tsx b/src/routes/Routers/index.tsx index ab65472..c102096 100644 --- a/src/routes/Routers/index.tsx +++ b/src/routes/Routers/index.tsx @@ -4,6 +4,7 @@ import { lazy, Suspense } from 'react' import { Navigate, Route, Routes } from 'react-router-dom' import LayoutComponent from '@components/Layout' + // Составная часть основной страницы, поэтому без lazy import Configurations from '@pages/ConfigurationsPage' import Connections from '@pages/ConnectionsPage' @@ -26,7 +27,9 @@ const ModulesPage = lazy(() => import('@pages/ModulesPage')) const ApplicationsPage = lazy(() => import('@pages/ApplicationsPage')) const AllVersionsPage = lazy(() => import('@pages/AllVersionsPage')) const ConfigurationEditorPage = lazy( - () => import('@pages/ConfigurationEditorPage')) + () => import('@pages/ConfigurationEditorPage') +) +const NotFound = lazy(() => import('@pages/NotFound')) const Routers = () => { return ( @@ -151,14 +154,14 @@ const Routers = () => { } /> - }> - - - }> - - + }> + + + } + > { } /> + }> + + + } + /> ) }