From f7a98183ca4bc4fa75ef6541fbf4b17c705ff718 Mon Sep 17 00:00:00 2001 From: ahmetselman Date: Sat, 14 Dec 2024 11:24:44 +0100 Subject: [PATCH] feat: configure error page --- src/app/error.tsx | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/src/app/error.tsx b/src/app/error.tsx index 6847fc17..e5588ec0 100644 --- a/src/app/error.tsx +++ b/src/app/error.tsx @@ -2,25 +2,34 @@ import { useEffect } from 'react'; -export default function Error({ error, reset }: { error: Error; reset: () => void }) { +import { CustomButton } from '@/components/Buttons/CustomButton'; +import { Topbar } from '@/components/Topbar/Topbar'; + +export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { useEffect(() => { // Log the error to an error reporting service /* eslint-disable no-console */ - console.error(error); }, [error]); return ( -
-

Something went wrong!

- +
+ +
+
+

An Error Occurred

+

Please try again or go back to the Home page.

+
+
+ reset()}> + Try again + + + + Go to Home page + + +
+
); }