From a6318133bdd3a415c1acc97b313fdc3876013dfd Mon Sep 17 00:00:00 2001 From: gearnode Date: Wed, 12 Feb 2025 08:57:36 -0800 Subject: [PATCH] Add error page Signed-off-by: gearnode --- apps/console/src/pages/ErrorPage.tsx | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 apps/console/src/pages/ErrorPage.tsx diff --git a/apps/console/src/pages/ErrorPage.tsx b/apps/console/src/pages/ErrorPage.tsx new file mode 100644 index 000000000..ef735a410 --- /dev/null +++ b/apps/console/src/pages/ErrorPage.tsx @@ -0,0 +1,35 @@ +import { AlertCircle } from "lucide-react"; +import { Link } from "react-router"; + +export interface ErrorPageProps { + error?: Error; + title?: string; + description?: string; +} + +export function ErrorPage({ + error, + title = "Something went wrong", + description = "An unexpected error occurred. Please try again later.", +}: ErrorPageProps) { + return ( +
+
+ +
+

{title}

+

{description}

+ {error?.message && ( +
+          {error.message}
+        
+ )} + + Return Home + +
+ ); +} \ No newline at end of file