@@ -75,22 +75,22 @@ export default function RootLayout() {
7575 const [ isRestoringSession , setIsRestoringSession ] = useState ( false ) ;
7676 const [ authReady , setAuthReady ] = useState ( false ) ; // Track when auth check is complete
7777
78- // Hide splash screen when BOTH fonts loaded AND auth checked
78+ // Hide native splash screen when fonts loaded (show AnimatedSplashScreen during login)
7979 const onLayoutRootView = useCallback ( async ( ) => {
80- if ( fontsLoaded && authReady ) {
81- // Small delay for smoother transition
82- await new Promise ( resolve => setTimeout ( resolve , 200 ) ) ;
80+ if ( fontsLoaded ) {
81+ // Hide native splash immediately when fonts ready
82+ // AnimatedSplashScreen will show until auth is complete
8383 await SplashScreen . hideAsync ( ) ;
8484 setAppIsReady ( true ) ;
8585 }
86- } , [ fontsLoaded , authReady ] ) ;
86+ } , [ fontsLoaded ] ) ;
8787
88- // Trigger splash hide when ready
88+ // Trigger native splash hide when fonts ready
8989 useEffect ( ( ) => {
90- if ( fontsLoaded && authReady ) {
90+ if ( fontsLoaded ) {
9191 onLayoutRootView ( ) ;
9292 }
93- } , [ fontsLoaded , authReady , onLayoutRootView ] ) ;
93+ } , [ fontsLoaded , onLayoutRootView ] ) ;
9494
9595 // Handle Android Navigation Bar Colors
9696 useEffect ( ( ) => {
@@ -384,8 +384,8 @@ export default function RootLayout() {
384384 }
385385 } , [ isAuthenticated , segments ] ) ;
386386
387- // Show animated splash screen while loading
388- if ( ! fontsLoaded || ! appIsReady ) {
387+ // Show animated splash screen while loading fonts or during login
388+ if ( ! fontsLoaded || ! authReady ) {
389389 return < AnimatedSplashScreen isLoading = { true } /> ;
390390 }
391391
0 commit comments