import { useState } from "react"; import { Link } from "react-router-dom"; import { useAuthStore } from "../stores/auth.ts"; export function ForgotPasswordPage() { const [email, setEmail] = useState(""); const [sent, setSent] = useState(false); const { requestPasswordReset, isLoading, error, clearError } = useAuthStore(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); clearError(); try { await requestPasswordReset(email); setSent(true); } catch { // error displayed from store } }; return (
          {"┌─ DUMPSTER ─┐"}
        

[FORGOT PASSWORD]

{sent ? (

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

The link expires in 1 hour.

[BACK TO LOGIN]
) : (

Enter the email address associated with your account and we'll send a link to reset your password.

setEmail(e.target.value)} className="terminal-input" required autoComplete="email" autoFocus />
{error &&

ERR: {error}

}
[BACK TO LOGIN]
)}
); }