mirror of
https://github.com/MAKS-IT-COM/maksit-certs-ui.git
synced 2026-03-31 23:02:10 +02:00
(bugfix): in release pdf is not loaded
This commit is contained in:
parent
c971ee94b2
commit
05821bdea5
@ -9,6 +9,10 @@ import 'react-pdf/dist/Page/AnnotationLayer.css'
|
||||
import 'react-pdf/dist/Page/TextLayer.css'
|
||||
|
||||
import type { PDFDocumentProxy } from 'pdfjs-dist'
|
||||
import pdfWorkerUrl from 'pdfjs-dist/build/pdf.worker.min.mjs?url'
|
||||
|
||||
// pdfjs-dist worker (bundled asset URL for prod)
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = pdfWorkerUrl
|
||||
|
||||
const LetsEncryptTermsOfService: FC = () => {
|
||||
|
||||
@ -20,11 +24,6 @@ const LetsEncryptTermsOfService: FC = () => {
|
||||
const containerRef = useRef<HTMLDivElement>(null)
|
||||
const [containerWidth, setContainerWidth] = useState<number>()
|
||||
|
||||
// Set up pdfjs worker
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
|
||||
'pdfjs-dist/build/pdf.worker.min.mjs',
|
||||
import.meta.url,
|
||||
).toString()
|
||||
useEffect(() => {
|
||||
const handleResize = () => {
|
||||
if (containerRef.current) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user