import { ArrowLeft, Download, RotateCcw } from "lucide-react"; import { navigate } from "../router"; export function readerErrorMessage(error: unknown, fallback: string): string { if (error instanceof Error && error.message.trim()) return error.message; if (typeof error === "string" && error.trim()) return error; return fallback; } export function ReaderError({ title, detail, technicalDetail, downloadUrl, backHref, onRetry }: { title: string; detail: string; technicalDetail?: string; downloadUrl?: string; backHref: string; onRetry: () => void; }) { return (

{title}

{detail}

{downloadUrl && ( Télécharger )}
{technicalDetail && (
Détail technique
{technicalDetail}
)}
); }