import React from 'react';
import { View, ActivityIndicator } from 'react-native';
import { Redirect } from 'expo-router';
import { useAuth } from './context/auth-context';
export default function Index() {
const { isAuthenticated, isLoading } = useAuth();
// Show loading indicator while checking auth status
if (isLoading) {
return (
);
}
// Redirect based on authentication status
if (isAuthenticated) {
return ;
} else {
return ;
}
}