diff --git a/App.tsx b/App.tsx index 48d6da5..59b6383 100644 --- a/App.tsx +++ b/App.tsx @@ -185,9 +185,17 @@ const App: React.FC = () => { }).catch(err => console.error('Erro ao limpar configurações no servidor:', err)); }, [handleReset]); - const handleExport = (action: 'preview' | 'download') => { - // Both actions now use native high-quality browser printing/PDF saving - window.print(); + const handleExport = async (action: 'preview' | 'download') => { + if (action === 'download') { + setIsLoading(true); + try { + await exportAsPdf('printable-report-container', 'SteelCheck_Report', 'download'); + } finally { + setIsLoading(false); + } + } else { + window.print(); + } }; return (