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 + +
+
+ ); +}