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 (
			<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
				<ActivityIndicator size="large" />
			</View>
		);
	}

	// Let the root layout handle the navigation based on auth state
	// Return null to avoid any default navigation
	return null;
}
