c74790e9b8565fd1c4db09f2743077a96c6abb36
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'} />;