import ViewLogin from "@/components/auth/viewLogin"; import ViewVerification from "@/components/auth/viewVerification"; import { useAuthSession } from "@/providers/AuthProvider"; import { Redirect } from "expo-router"; import { useState } from "react"; import { Text } from "react-native"; export default function Index() { const [isValid, setValid] = useState(false) const [phone, setPhone] = useState('') const [otp, setOtp] = useState(0) const { token, isLoading } = useAuthSession() if (isLoading) { return Loading...; } if (token?.current) { return ; } if (isValid) { return } return ( <> { setPhone(val.phone) setOtp(val.otp) setValid(true) }} /> ); }