We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3901745 commit 39f4954Copy full SHA for 39f4954
1 file changed
src/pages/home/previews/pdf.tsx
@@ -4,14 +4,18 @@ import { Box, useColorMode } from "@hope-ui/solid"
4
import { onMount } from "solid-js"
5
import { currentLang } from "~/app/i18n"
6
import { objStore } from "~/store"
7
+import { base_path } from "~/utils"
8
9
const PDFViewer = () => {
10
const { colorMode } = useColorMode()
11
let ref: HTMLDivElement | undefined
12
onMount(() => {
13
const src = objStore.raw_url
14
// wasm url must be absolute
- const absolutePdfiumWasmUrl = new URL(pdfiumWasmUrl, location.href).href
15
+ const absolutePdfiumWasmUrl = new URL(
16
+ pdfiumWasmUrl,
17
+ location.href + base_path,
18
+ ).href
19
if (ref && src) {
20
EmbedPDF.init({
21
type: "container",
0 commit comments