summaryrefslogtreecommitdiffhomepage
path: root/packages/ui
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ui')
-rw-r--r--packages/ui/src/components/font.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/ui/src/components/font.tsx b/packages/ui/src/components/font.tsx
index bcb8863c8..f735747a4 100644
--- a/packages/ui/src/components/font.tsx
+++ b/packages/ui/src/components/font.tsx
@@ -1,3 +1,4 @@
+import { Show } from "solid-js"
import { Style, Link } from "@solidjs/meta"
import inter from "../assets/fonts/inter.woff2"
import ibmPlexMonoRegular from "../assets/fonts/ibm-plex-mono.woff2"
@@ -166,8 +167,10 @@ export const Font = () => {
}
${monoNerdCss}
`}</Style>
- <Link rel="preload" href={inter} as="font" type="font/woff2" crossorigin="anonymous" />
- <Link rel="preload" href={ibmPlexMonoRegular} as="font" type="font/woff2" crossorigin="anonymous" />
+ <Show when={typeof location === "undefined" || location.protocol !== "file:"}>
+ <Link rel="preload" href={inter} as="font" type="font/woff2" crossorigin="anonymous" />
+ <Link rel="preload" href={ibmPlexMonoRegular} as="font" type="font/woff2" crossorigin="anonymous" />
+ </Show>
</>
)
}