import { ThemedText } from "@/components/theme/themed-text"; import { ThemedTextInput } from "@/components/theme/themed-textinput"; import { ThemedView } from "@/components/theme/themed-view"; import { router } from "expo-router"; import { signInWithEmailAndPassword } from "firebase/auth"; import React, { useState } from "react"; import { Button, StyleSheet, View } from "react-native"; import { auth } from "../../firebase_config"; const DEFAULT_ROLE = "resp"; const LoginScreen: React.FC = () => { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const handleLogin = async () => { try { await signInWithEmailAndPassword(auth, email, password); router.replace("/(tabs)"); } catch (error: any) { alert(error.message); } }; /*const handleRegister = async () => { try { await createUserWithEmailAndPassword(auth, email, password); router.replace("/(tabs)"); } catch (error: any) { alert(error.message); } }; */ return ( Se connecter