import { useAuth } from "@/context/auth-context"; import "@/global.css"; import { Redirect } from "expo-router"; import React from "react"; import { ActivityIndicator, View } from "react-native"; 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 ; } }