import { StyleSheet, TextInput, View, Text, Image } from "react-native"; import { useEffect, useState } from "react"; import { router } from "expo-router"; import Button from "../components/Button"; import { colors } from "../components/style"; import { useAuth } from "./context/AuthContext"; function LoginPage() { const [pass, setPass] = useState(""); const [email, setEmail] = useState(""); const { onLogin, authState } = useAuth(); useEffect(() => { if (authState.authenticated) { router.replace("/"); } }, [authState.authenticated]); function login() { onLogin(email, pass); } return ( Please Log In setEmail(text)} /> setPass(text)} />