2023-01-12 12:00:44 +00:00
|
|
|
import { useRouteError } from "react-router-dom";
|
|
|
|
|
2023-01-12 15:35:42 +00:00
|
|
|
const ErrorPage = () => {
|
2023-01-12 12:00:44 +00:00
|
|
|
const error = useRouteError();
|
|
|
|
|
|
|
|
console.error(error);
|
|
|
|
return (
|
|
|
|
<>
|
2023-01-12 15:35:42 +00:00
|
|
|
<h4>An error has occured!</h4>
|
2023-01-12 12:00:44 +00:00
|
|
|
<pre>
|
2023-01-12 15:35:42 +00:00
|
|
|
{JSON.stringify(error, undefined, ' ')}
|
2023-01-12 12:00:44 +00:00
|
|
|
</pre>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ErrorPage;
|