Skip to content

Commit dc0750a

Browse files
committed
Added UI for transaction records in Data package
1 parent 8a32e96 commit dc0750a

File tree

10 files changed

+1478
-663
lines changed

10 files changed

+1478
-663
lines changed

apps/web/src/components/PDF/PDF.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,29 @@ export const PDF = memo(
120120
<Document
121121
file={inputFileUrl}
122122
onLoadSuccess={(document: pdfjs.PDFDocumentProxy) => {
123+
console.log("PDF loaded successfully:", inputFileUrl, "Pages:", document.numPages);
123124
setNumPages(document.numPages);
124125
onLoadSuccess?.(document.numPages);
125126
}}
127+
onLoadError={(error) => {
128+
console.error("PDF load error:", error, "URL:", inputFileUrl);
129+
}}
126130
loading={
127131
<div style={{ width: "100%", height: "calc(100vh - 132px)" }}>
128132
<Loader />
129133
</div>
130134
}
131-
error={<div className="error">Failed to load PDF</div>}
135+
error={
136+
<div className="error" style={{ padding: "20px", textAlign: "center" }}>
137+
<div>Failed to load PDF</div>
138+
<div style={{ fontSize: "12px", marginTop: "8px", opacity: 0.7 }}>
139+
URL: {inputFileUrl}
140+
</div>
141+
<div style={{ fontSize: "12px", marginTop: "4px", opacity: 0.7 }}>
142+
Check browser console for details
143+
</div>
144+
</div>
145+
}
132146
options={options}
133147
>
134148
<Flex

0 commit comments

Comments
 (0)