diff --git a/projects/website/src/app/global-error.tsx b/projects/website/src/app/global-error.tsx index 362f8e8..383ddee 100644 --- a/projects/website/src/app/global-error.tsx +++ b/projects/website/src/app/global-error.tsx @@ -1,23 +1,37 @@ "use client"; -import * as Sentry from "@sentry/nextjs"; -import NextError from "next/error"; +import { GlobeAmericasIcon } from "@heroicons/react/24/solid"; +import Link from "next/link"; import { useEffect } from "react"; +import * as Sentry from "@sentry/nextjs"; +import Card from "@/components/card"; -export default function GlobalError({ error }: { error: Error & { digest?: string } }) { +/** + * Error page component for handling global errors. + * + * @param error - The error object passed to the component. + */ +export default function ErrorPage({ error }: { error: Error & { digest?: string } }) { useEffect(() => { Sentry.captureException(error); }, [error]); return ( - -
- {/* `NextError` is the default Next.js error page component. Its type - definition requires a `statusCode` prop. However, since the App Router - does not expose status codes for errors, we simply pass 0 to render a - generic error message. */} -+ We're experiencing some technical difficulties. Please try again later. +
+ {error?.digest &&Error Code: {error.digest}
} + +