Skip to content

Commit

Permalink
Merge pull request #496 from 1ifeworld/j/pdf
Browse files Browse the repository at this point in the history
pdf update
  • Loading branch information
jawndiego authored Feb 20, 2024
2 parents bcc6135 + 400217b commit 7427dca
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 116 deletions.
5 changes: 1 addition & 4 deletions apps/site/components/client/renderers/PDFViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
import React, { useEffect, useRef, useState } from 'react'
import { Document, Page, pdfjs } from 'react-pdf'

pdfjs.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.min.js',
import.meta.url,
).toString()
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`

interface PDFViewerProps {
file: string
Expand Down
2 changes: 1 addition & 1 deletion apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"react-fast-marquee": "^1.6.3",
"react-hook-form": "^7.47.0",
"react-markdown": "^9.0.1",
"react-pdf": "^7.6.0",
"react-pdf": "^7.7.0",
"remark-gfm": "^4.0.0",
"scrypt": "workspace:*",
"server-only": "^0.0.1",
Expand Down
Loading

0 comments on commit 7427dca

Please sign in to comment.