From a05deddb28e79ace4b31af12aa2a2a1a9fced173 Mon Sep 17 00:00:00 2001 From: gimenes Date: Fri, 18 Oct 2024 10:29:54 -0300 Subject: [PATCH] error page --- app/ErrorPage.tsx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/app/ErrorPage.tsx b/app/ErrorPage.tsx index 17cb2e0..f6d74ee 100644 --- a/app/ErrorPage.tsx +++ b/app/ErrorPage.tsx @@ -4,11 +4,26 @@ export default function ErrorPage() { const error = useRouteError(); console.error(error); + if (error.status === 404) { + return ( +
+

404 - Page Not Found

+

Sorry, the page you are looking for does not exist.

+

+ To add new routes, create a new file in app/routes and register it in app.tsx. +

+ + React Router Documentation + +
+ ); + } + return ( -
-

Oops!

-

Sorry, an unexpected error has occurred.

-

+

+

Oops!

+

Sorry, an unexpected error has occurred.

+

{error.statusText || error.message}