From 4bd161ab885ca6e2f2b45b1085a0bf139c84df76 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 22:51:31 +0530 Subject: [PATCH 1/8] feat: not found component --- src/components/dashboard/NotFound.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/components/dashboard/NotFound.tsx diff --git a/src/components/dashboard/NotFound.tsx b/src/components/dashboard/NotFound.tsx new file mode 100644 index 00000000..dc5d640d --- /dev/null +++ b/src/components/dashboard/NotFound.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +export function NotFoundPage() { + return ( +
+

404 - Page Not Found

+

Oops! This page does not. exist.

+ Go to Homepage +
+ ); + } \ No newline at end of file From b68ce4918fcfa9ff916dac8887f08b45afc670a9 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:01:56 +0530 Subject: [PATCH 2/8] feat: global route for invalid pages --- src/pages/PageWrappper.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/PageWrappper.tsx b/src/pages/PageWrappper.tsx index d778c186..f676a8a1 100644 --- a/src/pages/PageWrappper.tsx +++ b/src/pages/PageWrappper.tsx @@ -12,6 +12,7 @@ import Login from './Login'; import Register from './Register'; import UserRoute from '../routes/userRoute'; import { Routes, Route, useNavigate, Navigate } from 'react-router-dom'; +import { NotFoundPage } from '../components/dashboard/NotFound'; import { Runs } from '../components/run/Runs'; export const PageWrapper = () => { @@ -75,6 +76,7 @@ export const PageWrapper = () => { path="/register" element={} /> + } /> From f2010deb34e87f301fcfe67e067cfc6b743a404b Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:02:19 +0530 Subject: [PATCH 3/8] chore: -rm unused import --- src/pages/PageWrappper.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/PageWrappper.tsx b/src/pages/PageWrappper.tsx index f676a8a1..1e73f26a 100644 --- a/src/pages/PageWrappper.tsx +++ b/src/pages/PageWrappper.tsx @@ -13,7 +13,6 @@ import Register from './Register'; import UserRoute from '../routes/userRoute'; import { Routes, Route, useNavigate, Navigate } from 'react-router-dom'; import { NotFoundPage } from '../components/dashboard/NotFound'; -import { Runs } from '../components/run/Runs'; export const PageWrapper = () => { const [open, setOpen] = useState(false); From 5272b1c06fc8896ec82163a8be45a93613f6203d Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:02:35 +0530 Subject: [PATCH 4/8] chore: lint --- src/components/dashboard/NotFound.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/dashboard/NotFound.tsx b/src/components/dashboard/NotFound.tsx index dc5d640d..4bf01d91 100644 --- a/src/components/dashboard/NotFound.tsx +++ b/src/components/dashboard/NotFound.tsx @@ -1,11 +1,11 @@ import React from 'react'; export function NotFoundPage() { - return ( -
-

404 - Page Not Found

-

Oops! This page does not. exist.

- Go to Homepage -
- ); - } \ No newline at end of file + return ( +
+

404 - Page Not Found

+

Oops! This page does not. exist.

+ Go to Homepage +
+ ); +} \ No newline at end of file From 0b8d4868b5256461d26986f699c4216c2256ebcd Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:04:35 +0530 Subject: [PATCH 5/8] fix: not found message --- src/components/dashboard/NotFound.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dashboard/NotFound.tsx b/src/components/dashboard/NotFound.tsx index 4bf01d91..0b24986d 100644 --- a/src/components/dashboard/NotFound.tsx +++ b/src/components/dashboard/NotFound.tsx @@ -4,8 +4,8 @@ export function NotFoundPage() { return (

404 - Page Not Found

-

Oops! This page does not. exist.

- Go to Homepage +

Oops! This page does not exist.

+ Take me to the homepage
); } \ No newline at end of file From e643718404526e77d15bccce6fec7da58f5d6f5c Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:05:04 +0530 Subject: [PATCH 6/8] feat: set text decoration to none --- src/components/dashboard/NotFound.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/NotFound.tsx b/src/components/dashboard/NotFound.tsx index 0b24986d..456c6f1d 100644 --- a/src/components/dashboard/NotFound.tsx +++ b/src/components/dashboard/NotFound.tsx @@ -5,7 +5,7 @@ export function NotFoundPage() {

404 - Page Not Found

Oops! This page does not exist.

- Take me to the homepage + Take me to the homepage
); } \ No newline at end of file From ec0867eb6e6f0fc669a6486b1d2b7abad2f30456 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:05:58 +0530 Subject: [PATCH 7/8] fix: -rm unused style --- src/components/dashboard/NotFound.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/NotFound.tsx b/src/components/dashboard/NotFound.tsx index 456c6f1d..ab9d4717 100644 --- a/src/components/dashboard/NotFound.tsx +++ b/src/components/dashboard/NotFound.tsx @@ -2,7 +2,7 @@ import React from 'react'; export function NotFoundPage() { return ( -
+

404 - Page Not Found

Oops! This page does not exist.

Take me to the homepage From a324220275400c6567996af51fd2361608824dff Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 14 Jan 2025 23:07:07 +0530 Subject: [PATCH 8/8] fix: format --- src/components/dashboard/NotFound.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/NotFound.tsx b/src/components/dashboard/NotFound.tsx index ab9d4717..9b81acb0 100644 --- a/src/components/dashboard/NotFound.tsx +++ b/src/components/dashboard/NotFound.tsx @@ -5,7 +5,7 @@ export function NotFoundPage() {

404 - Page Not Found

Oops! This page does not exist.

- Take me to the homepage + Take me to the homepage
); } \ No newline at end of file