import { Button, ButtonSize, Colors, KeyboardAwareScrollView, LoaderScreen, Text, TextField, TextFieldRef, View, } from "react-native-ui-lib"; import React, {useRef, useState} from "react"; import {useSignIn} from "@/hooks/firebase/useSignIn"; import {KeyboardAvoidingView, Platform, StyleSheet} from "react-native"; import Toast from "react-native-toast-message"; import KeyboardManager from "react-native-keyboard-manager"; import {SafeAreaView} from "react-native-safe-area-context"; import {useRouter} from "expo-router"; KeyboardManager.setEnableAutoToolbar(true); const SignInPage = () => { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const passwordRef = useRef(null); const {mutateAsync: signIn, error, isError, isLoading} = useSignIn(); const router = useRouter() const handleSignIn = async () => { await signIn({email, password}); if (!isError) { Toast.show({ type: "success", text1: "Login successful!", }); } else { Toast.show({ type: "error", text1: "Error logging in", text2: `${error}`, }); } }; return ( Jump back into Cally Please enter your details. { // Move focus to the description field passwordRef.current?.focus(); }} />