import React, { useState, useContext } from 'react'; import { Eye, EyeOff, Lock, LogIn, Mail } from 'lucide-react-native'; import { KeyboardAvoidingView, Platform, ScrollView, Text, TextInput, TouchableOpacity, View, Image } from 'react-native'; import { AuthContext } from '@/utils/authContext'; export default function LoginScreen() { const authContext = useContext(AuthContext); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); const [isLoading, setIsLoading] = useState(false); const handleLogin = () => { setIsLoading(true); // Simulazione login setTimeout(() => { setIsLoading(false); authContext.logIn(); }, 1500); }; return ( {/* Header con Logo/Titolo */} {/* Form Container */} {/* Input Email */} Email o Username {/* Input Password */} Password setShowPassword(!showPassword)}> {showPassword ? ( ) : ( )} Password dimenticata? {/* Tasto Login */} {isLoading ? 'Accesso in corso...' : 'Accedi'} {!isLoading && } ); }