about summary refs log tree commit diff
path: root/src/App.web.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-09-18 20:22:03 -0500
committerGitHub <noreply@github.com>2024-09-18 20:22:03 -0500
commitbda355fd58a06b5fe7cf58a12d32769f75112a4f (patch)
treeda95b1de575c0f7579c465bd9307b1edc8e6f5f9 /src/App.web.tsx
parentcbc7cd080889bbb8af052717d2831880ccd10475 (diff)
downloadvoidsky-bda355fd58a06b5fe7cf58a12d32769f75112a4f.tar.zst
Fix font loading on web (#5412)
* Copy font files during build

* Fall back if error loading fonts
Diffstat (limited to 'src/App.web.tsx')
-rw-r--r--src/App.web.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/App.web.tsx b/src/App.web.tsx
index 1c6650733..846d178f9 100644
--- a/src/App.web.tsx
+++ b/src/App.web.tsx
@@ -144,13 +144,13 @@ function InnerApp() {
 
 function App() {
   const [isReady, setReady] = useState(false)
-  const [loaded] = useFonts()
+  const [loaded, error] = useFonts()
 
   React.useEffect(() => {
     initPersistedState().then(() => setReady(true))
   }, [])
 
-  if (!isReady || !loaded) {
+  if (!isReady || (!loaded && !error)) {
     return null
   }