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 (
RealBlocks

Check your email

If an account exists for {email}, we've sent a password reset link.

Back to Sign In
); } return (
RealBlocks

Reset your password

{error && (
{error}
)}

Enter your email address and we'll send you a link to reset your password.

setEmail(e.target.value)} className="input pl-10" placeholder="you@example.com" required />
Back to Sign In
); }