snort/src/pages/ErrorPage.tsx

19 lines
384 B
TypeScript
Raw Normal View History

2023-01-12 12:00:44 +00:00
import React, { FC } from "react";
import { useRouteError } from "react-router-dom";
const ErrorPage: FC = () => {
const error = useRouteError();
console.error(error);
return (
<>
<h4>{error?.message ?? "Uknown error"}</h4>
<pre>
{JSON.stringify(error)}
</pre>
</>
);
};
export default ErrorPage;