add error page

This commit is contained in:
andrzej 2024-06-03 18:20:19 +02:00
parent b76fae1456
commit cc589e48ac
1 changed files with 16 additions and 0 deletions

16
src/error-page.tsx Normal file
View File

@ -0,0 +1,16 @@
import { useRouteError } from "react-router-dom";
export default function ErrorPage() {
const error: any = useRouteError();
console.error(error);
return (
<div id="error-page">
<h1>Oops!</h1>
<p>Sorry, an unexpected error has occurred.</p>
<p>
<i>{error.statusText || error.message}</i>
</p>
</div>
);
}