fix(mobile): remove custom font loader causing SIGABRT crash on iOS release
This commit is contained in:
@@ -1,27 +1,11 @@
|
||||
import { useEffect } from "react";
|
||||
import { Stack } from "expo-router";
|
||||
import { useFonts } from "expo-font";
|
||||
import Ionicons from "@expo/vector-icons/Ionicons";
|
||||
import * as SplashScreen from "expo-splash-screen";
|
||||
|
||||
SplashScreen.preventAutoHideAsync().catch(() => {});
|
||||
import { StatusBar } from "expo-status-bar";
|
||||
|
||||
export default function RootLayout() {
|
||||
const [loaded, error] = useFonts({
|
||||
Ionicons: require("@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.ttf"),
|
||||
ionicons: require("@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.ttf"),
|
||||
...(Ionicons.font || {}),
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (loaded || error) {
|
||||
SplashScreen.hideAsync().catch(() => {});
|
||||
}
|
||||
}, [loaded, error]);
|
||||
|
||||
if (!loaded && !error) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <Stack screenOptions={{ headerShown: false }} />;
|
||||
return (
|
||||
<>
|
||||
<StatusBar style="dark" />
|
||||
<Stack screenOptions={{ headerShown: false }} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user