import { StyleSheet, TextInput, View, Image } from "react-native"; import Text from "@components/Text"; import Link from "@components/Link"; import { LinearGradient } from "expo-linear-gradient"; import { Animated } 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)} />