import { useRouteError } from "react-router-dom"; export default function ErrorPage() { const error = useRouteError(); console.error(error); return (

Oops!

Sorry, an unexpected error has occurred.

{error.statusText || error.message}

); }