import { useRef } from "react"; interface ReportViewerProps { reportHtml: string; onBack: () => void; onExportPdf: () => void; onExportPng: () => void; } export function ReportViewer({ reportHtml, onBack, onExportPdf, onExportPng }: ReportViewerProps) { const iframeRef = useRef(null); const handleDownloadHtml = () => { const blob = new Blob([reportHtml], { type: "text/html" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = "classlens-report.html"; a.click(); URL.revokeObjectURL(url); }; return (
{/* Action bar */}
{/* Report iframe */}