import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { toast } from 'react-toastify' import { MapOverlayPage } from '#components/Templates/MapOverlayPage' import { useAuth } from './useAuth' /** * @category Auth */ export function RequestPasswordPage({ resetUrl }: { resetUrl: string }) { const [email, setEmail] = useState('') const { requestPasswordReset, loading } = useAuth() const navigate = useNavigate() const onReset = async () => { await toast.promise(requestPasswordReset(email, resetUrl), { success: { render() { navigate('/') return 'Check your mailbox' }, // other options icon: '📬', }, error: { render({ data }) { return `${data as string}` }, }, pending: 'sending email ...', }) } return (

Reset Password

setEmail(e.target.value)} className='tw:input tw:input-bordered tw:w-full tw:max-w-xs' />
) }