import React, { useState } from 'react' import { useNavigate, Link } from 'react-router-dom' import { motion } from 'framer-motion' import { Mail, Lock, LogIn, Layout } from 'lucide-react' import { useAuth } from '../contexts/AuthContext' export const LoginPage: React.FC = () => { const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [isLoading, setIsLoading] = useState(false) const navigate = useNavigate() const { login } = useAuth() const handleLogin = async (e: React.FormEvent) => { e.preventDefault() setIsLoading(true) try { await login(email, password) navigate('/') } catch (error) { console.error('Login failed', error) alert('Erro ao fazer login. Tente novamente.') } finally { setIsLoading(false) } } return (
Bem-vindo de volta ao seu workspace
Não tem uma conta? Criar conta
Precisa de ajuda? Falar com suporte