import { useState } from 'react' import { View, Text, TextInput, TouchableOpacity, KeyboardAvoidingView, Platform, ActivityIndicator, Alert, } from 'react-native' import { useAuthStore } from '@/lib/store' export default function LoginScreen() { const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [loading, setLoading] = useState(false) const login = useAuthStore((s) => s.login) const handleLogin = async () => { if (!email.trim() || !password.trim()) return setLoading(true) try { await login(email.trim().toLowerCase(), password) } catch (e: any) { Alert.alert('Connexion échouée', e.message) } finally { setLoading(false) } } return ( {/* Logo */} Momento Votre espace de connaissance {/* Form */} Email Mot de passe {loading ? ( ) : ( Se connecter )} memento-note.com ) }