fix: replace PDF with HTML report (fontkit unavailable)
This commit is contained in:
@@ -923,13 +923,9 @@ export const AssessmentView: React.FC<AssessmentViewProps> = ({
|
||||
const binary = atob(result.buffer);
|
||||
const bytes = new Uint8Array(binary.length);
|
||||
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
||||
const blob = new Blob([bytes], { type: 'application/pdf' });
|
||||
const blob = new Blob([bytes], { type: 'text/html;charset=utf-8' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = result.filename;
|
||||
a.click();
|
||||
URL.revokeObjectURL(url);
|
||||
window.open(url, '_blank');
|
||||
} catch (err) {
|
||||
setError(t('exportAssessmentFailed'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user