import React, { useState } from "react"; import { Link } from "react-router-dom"; import { base44 } from "@/api/base44Client"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Mail, ArrowLeft, Loader2 } from "lucide-react"; import AuthLayout from "@/components/AuthLayout"; export default function ForgotPassword() { const [email, setEmail] = useState(""); const [loading, setLoading] = useState(false); const [sent, setSent] = useState(false); const handleSubmit = async (e) => { e.preventDefault(); setLoading(true); try { await base44.auth.resetPasswordRequest(email); } catch { // Always show success regardless } finally { setLoading(false); setSent(true); } }; return ( Back to log in } > {sent ? (

If an account exists with that email, you'll receive a password reset link shortly.

) : (
)}
); }