import { Button } from "@repo/shadcn-ui/components"; import { HomeIcon } from "lucide-react"; import { JSX } from "react"; import { useNavigate } from "react-router-dom"; import { BackHistoryButton } from "./buttons/back-history-button.tsx"; interface ErrorOverlayProps { title?: string; subtitle?: string; description?: string; errorMessage?: string; //errorStatusCode?: number | string | undefined; } /*const _DrawByStatusCode = { 0: UndrawAutumn, 404: UndrawNoData, //UndrawEmpty, };*/ export const ErrorOverlay = ({ title = "Se ha producido un error", subtitle = "Inténtalo de nuevo más tarde", description = undefined, errorMessage = undefined, }: //errorStatusCode = undefined, ErrorOverlayProps): JSX.Element => { const navigate = useNavigate(); /*const ErrorIllustration = () => String(errorStatusCode).length ? _DrawByStatusCode[String(errorStatusCode)] : _DrawByStatusCode['0'];*/ return (

{title}

{subtitle || errorMessage}
{description}

); }; ErrorOverlay.displayName = "ErrorOverlay";