"use client"; import { useState } from "react"; import Link from "next/link"; import AuthShell, { Field } from "@/components/AuthShell"; import { api } from "@/lib/api"; export default function Forgot() { const [email, setEmail] = useState(""); const [sent, setSent] = useState(false); async function submit(e: React.FormEvent) { e.preventDefault(); await api("/auth/forgot-password", { method: "POST", body: JSON.stringify({ email }) }); setSent(true); } return ( {sent ? (

If that email exists, a reset link is on its way. (Dev: check backend console.)

) : (
setEmail(e.target.value)} required /> )} Back to login
); }