import { useAuth } from '~/features/auth'; import { ActivityIndicator, View } from 'react-native'; export default function Index() { const { isAuthenticated, loading } = useAuth(); // Show loading while checking auth if (loading) { return ( ); } // Let the root layout handle the navigation based on auth state // Return null to avoid any default navigation return null; }