4ead651accffd9854b38af6281c55a97628292b6
import { Redirect } from 'expo-router';
import { useAuth } from '@/context/AuthContext';
import { ActivityIndicator, View } from 'react-native';
export default function Index() {
const { isAuthenticated, isLoading } = useAuth();
if (isLoading) {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<ActivityIndicator size="large" />
</View>
);
}
return <Redirect href={isAuthenticated ? '/(tabs)/new' : '/auth/login'} />;