Fix bugs: office auth, PDF worker, sidebar pins, direct downloads
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m0s

This commit is contained in:
Elijah 2026-05-31 21:16:17 -07:00
parent e88243f097
commit bfe55e2bfc
6 changed files with 74 additions and 32 deletions

View file

@ -7,7 +7,7 @@ import 'react-pdf/dist/Page/AnnotationLayer.css';
import 'react-pdf/dist/Page/TextLayer.css';
if (typeof window !== 'undefined') {
pdfjs.GlobalWorkerOptions.workerSrc = `/pdf.worker.min.mjs`;
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
}
export default function PdfViewer({ url }: { url: string }) {
@ -53,6 +53,7 @@ export default function PdfViewer({ url }: { url: string }) {
<Document
file={url}
onLoadSuccess={onDocumentLoadSuccess}
onLoadError={(error) => console.error('Failed to load PDF:', error)}
loading={
<div className="flex items-center justify-center h-full mt-20">
<Loader2 className="w-8 h-8 animate-spin" style={{ color: 'var(--color-accent)' }} />