diff --git a/src/App.tsx b/src/App.tsx index 191f80b79fef10bf4c99a1777437ca665d487626..f0a86b423f208efb3b101ef2fc6e00b593940150 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,9 @@ import { AuthUser } from 'components/AuthUser/AuthUser'; import { LandingPage } from 'components/LandingPage/LandingPage'; import { PrivateRoute } from 'components/api/PrivateRoute/PrivateRoute'; import { AuthRoutes, NonAuthRoutes } from 'components/api/routes'; +import { NotFound } from 'components/NotFound/NotFound'; import { Roles } from 'components/api/userRoles'; +import { Unauthorized } from 'components/Unauthorized/Unauthorized'; export const App: FC = () => ( <Router> @@ -18,6 +20,8 @@ export const App: FC = () => ( Component={HomePage} requiredRoles={[Roles.admin, Roles.operator, Roles.senior]} /> + <Route path={NonAuthRoutes.unauthorized} component={Unauthorized} /> + <Route component={NotFound} /> </Switch> </div> </Router> diff --git a/src/components/NotFound/NotFound.tsx b/src/components/NotFound/NotFound.tsx index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f514a0f1691cf6d689854436d0ed932f3b0af9cd 100644 --- a/src/components/NotFound/NotFound.tsx +++ b/src/components/NotFound/NotFound.tsx @@ -0,0 +1,3 @@ +import React, { FC } from 'react'; + +export const NotFound: FC = () => <h1>Page not found</h1>; diff --git a/src/components/Unauthorized/Unauthorized.tsx b/src/components/Unauthorized/Unauthorized.tsx index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0e53bf59f28c1f9e4abf43489906f1b6e8f59b10 100644 --- a/src/components/Unauthorized/Unauthorized.tsx +++ b/src/components/Unauthorized/Unauthorized.tsx @@ -0,0 +1,3 @@ +import React, { FC } from 'react'; + +export const Unauthorized: FC = () => <h1>You cannot access this page</h1>;