From 84fbccaf6ec748da51bc75f48becd85ece244978 Mon Sep 17 00:00:00 2001 From: XCODE89 Date: Thu, 22 Aug 2024 16:18:57 -0400 Subject: [PATCH] OV-44: + not found page --- .../common/components/not-found/not-found.tsx | 79 +++++++++++++++++++ .../src/router/routes/protected-routes.tsx | 5 +- 2 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 frontend/src/bundles/common/components/not-found/not-found.tsx diff --git a/frontend/src/bundles/common/components/not-found/not-found.tsx b/frontend/src/bundles/common/components/not-found/not-found.tsx new file mode 100644 index 000000000..9e5de2c21 --- /dev/null +++ b/frontend/src/bundles/common/components/not-found/not-found.tsx @@ -0,0 +1,79 @@ +import { Box, Center, Text } from '@chakra-ui/react'; +import { motion } from 'framer-motion'; + +const NotFound: React.FC = () => { + const circleAnimation = { + r: [1, 5, 10, 15, 20], + opacity: [0.9, 0.3, 0.2, 0.1, 0], + }; + + const circleTransition = { + repeat: Number.POSITIVE_INFINITY, + ease: 'easeOut', + duration: 2, + }; + + return ( +
+ + + + + 4 + + + 4 + + + + + + + + + + [Page not found] + + +
+ ); +}; + +export { NotFound }; diff --git a/frontend/src/router/routes/protected-routes.tsx b/frontend/src/router/routes/protected-routes.tsx index 4724f0a4b..942cc7068 100644 --- a/frontend/src/router/routes/protected-routes.tsx +++ b/frontend/src/router/routes/protected-routes.tsx @@ -1,5 +1,4 @@ -import { Navigate } from 'react-router-dom'; - +import { NotFound } from '~/bundles/common/components/not-found/not-found.js'; import { AppRoute } from '~/bundles/common/enums/app-route.enum.js'; import { Studio } from '~/bundles/studio/pages/studio.js'; @@ -16,7 +15,7 @@ const protectedRoutes = { }, { path: AppRoute.ANY, - element: , + element: , }, ], };