import { useState, type FormEvent } from 'react'
import { Link, Navigate } from 'react-router-dom'
import { requestPasswordReset } from '../api/auth'
import { useAuth } from '../context/AuthContext'
import logo from '../assets/logo.png'
import './LoginPage.css'
export function ForgotPasswordPage() {
const { user } = useAuth()
const [email, setEmail] = useState('')
const [submitting, setSubmitting] = useState(false)
const [sent, setSent] = useState(false)
if (user) return
If an account exists for that email, a password reset link is on its way. The link expires in 15 minutes.
) : ( <>Enter your account email and we'll send a reset link.
> )} Back to log in