This commit is contained in:
zimplexing
2025-07-02 12:19:47 +08:00
parent 63a4ed6f52
commit 86939e9968
5 changed files with 234 additions and 67 deletions

View File

@@ -10,6 +10,7 @@ import { useEffect } from "react";
import { Platform } from "react-native";
import { useColorScheme } from "@/hooks/useColorScheme";
import { initializeApi } from "@/services/api";
// Prevent the splash screen from auto-hiding before asset loading is complete.
SplashScreen.preventAutoHideAsync();
@@ -29,6 +30,10 @@ export default function RootLayout() {
}
}, [loaded, error]);
useEffect(() => {
initializeApi();
}, []);
if (!loaded && !error) {
return null;
}