import { useState } from 'react'; import { Link } from 'react-router-dom'; import { useAuthStore } from '../../store/authStore'; import { Blocks, Mail, ArrowLeft, CheckCircle } from 'lucide-react'; export default function ForgotPassword() { const [email, setEmail] = useState(''); const [sent, setSent] = useState(false); const { forgotPassword, loading, error } = useAuthStore(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); try { await forgotPassword(email); setSent(true); } catch {} }; if (sent) { return (
If an account exists for {email}, we've sent a password reset link.
Back to Sign InReset your password