import { Redirect } from "expo-router"; import { useAuthStore } from "../src/store"; import { View, ActivityIndicator, StyleSheet } from "react-native"; export default function Index() { const { isAuthenticated, isLoading, user } = useAuthStore(); // Show loading state if (isLoading) { return ( ); } // Redirect based on auth state if (!isAuthenticated) { return ; } // If user has no couple, go to pairing if (!user?.couple_id) { return ; } // Otherwise go to home return ; } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: "center", alignItems: "center", backgroundColor: "#1a1a2e", }, });