import { useState } from 'react'
import { Link } from 'react-router-dom'
import { authApi } from '@/api/auth'
import { BrandLogo } from '@/components/common/BrandLogo'
import { PageMeta } from '@/components/common/PageMeta'
import { cn } from '@/lib/utils'
export function ForgotPasswordPage() {
const [email, setEmail] = useState('')
const [isLoading, setIsLoading] = useState(false)
const [submitted, setSubmitted] = useState(false)
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault()
if (!email) return
setIsLoading(true)
try {
await authApi.forgotPassword(email)
} catch {
// Always show success (anti-enumeration)
} finally {
setIsLoading(false)
setSubmitted(true)
}
}
return (
<>
Enter your email and we'll send you a link to reset your password.