From c3885059cfc57eb8610f0d14d8eae52f6f204355 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 28 Feb 2026 20:24:15 -0800 Subject: [PATCH] feat(dashboards): add error and not-found pages for admin and tracker dashboards --- dashboards/admin-web/src/app/error.tsx | 33 ++++++++++++++++++++ dashboards/admin-web/src/app/not-found.tsx | 21 +++++++++++++ dashboards/tracker-web/src/app/error.tsx | 33 ++++++++++++++++++++ dashboards/tracker-web/src/app/not-found.tsx | 21 +++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 dashboards/admin-web/src/app/error.tsx create mode 100644 dashboards/admin-web/src/app/not-found.tsx create mode 100644 dashboards/tracker-web/src/app/error.tsx create mode 100644 dashboards/tracker-web/src/app/not-found.tsx diff --git a/dashboards/admin-web/src/app/error.tsx b/dashboards/admin-web/src/app/error.tsx new file mode 100644 index 00000000..985f8721 --- /dev/null +++ b/dashboards/admin-web/src/app/error.tsx @@ -0,0 +1,33 @@ +'use client'; + +import { useEffect } from 'react'; + +export default function GlobalError({ + error, + reset, +}: { + error: Error & { digest?: string }; + reset: () => void; +}) { + useEffect(() => { + // TODO: send to telemetry once wired + }, [error]); + + return ( +
+
+
+

Something went wrong

+

+ {error.message || 'An unexpected error occurred.'} +

+ +
+
+ ); +} diff --git a/dashboards/admin-web/src/app/not-found.tsx b/dashboards/admin-web/src/app/not-found.tsx new file mode 100644 index 00000000..dbd19ad5 --- /dev/null +++ b/dashboards/admin-web/src/app/not-found.tsx @@ -0,0 +1,21 @@ +import Link from 'next/link'; + +export default function NotFound() { + return ( +
+
+
404
+

Page not found

+

+ The page you're looking for doesn't exist or has been moved. +

+ + Go to Dashboard + +
+
+ ); +} diff --git a/dashboards/tracker-web/src/app/error.tsx b/dashboards/tracker-web/src/app/error.tsx new file mode 100644 index 00000000..985f8721 --- /dev/null +++ b/dashboards/tracker-web/src/app/error.tsx @@ -0,0 +1,33 @@ +'use client'; + +import { useEffect } from 'react'; + +export default function GlobalError({ + error, + reset, +}: { + error: Error & { digest?: string }; + reset: () => void; +}) { + useEffect(() => { + // TODO: send to telemetry once wired + }, [error]); + + return ( +
+
+
+

Something went wrong

+

+ {error.message || 'An unexpected error occurred.'} +

+ +
+
+ ); +} diff --git a/dashboards/tracker-web/src/app/not-found.tsx b/dashboards/tracker-web/src/app/not-found.tsx new file mode 100644 index 00000000..9fb3e72b --- /dev/null +++ b/dashboards/tracker-web/src/app/not-found.tsx @@ -0,0 +1,21 @@ +import Link from 'next/link'; + +export default function NotFound() { + return ( +
+
+
404
+

Page not found

+

+ The page you're looking for doesn't exist or has been moved. +

+ + Go Home + +
+
+ ); +}