Fix font loading on web (#5412)

* Copy font files during build

* Fall back if error loading fonts
This commit is contained in:
Eric Bailey
2024-09-18 20:22:03 -05:00
committed by GitHub
parent cbc7cd0808
commit bda355fd58
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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
}