import React, { useState } from 'react'; import { useNavigate, Link } from 'react-router-dom'; import { Hexagon, Mail, ArrowRight, Loader2, ArrowLeft, CheckCircle2 } from 'lucide-react'; import { forgotPassword } from '../services/dataService'; export const ForgotPassword: React.FC = () => { const [isLoading, setIsLoading] = useState(false); const [email, setEmail] = useState(''); const [error, setError] = useState(''); const [isSuccess, setIsSuccess] = useState(false); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setIsLoading(true); setError(''); try { await forgotPassword(email); setIsSuccess(true); } catch (err: any) { setError(err.message || 'Erro ao processar solicitação.'); } finally { setIsLoading(false); } }; return (
Digite seu e-mail e enviaremos as instruções.
Se o e-mail {email} estiver cadastrado, você receberá um link em instantes.