import React, { useState } from 'react'; import { sendPasswordResetEmail } from 'firebase/auth'; import { auth } from '../firebase'; const ResetPage = () => { const [email, setEmail] = useState(''); const [message, setMessage] = useState(''); const [error, setError] = useState(''); const handleReset = async () => { try { await sendPasswordResetEmail(auth, email); setMessage('Reset link sent to your email'); } catch (error) { setError(error.message); } }; return (
{error}
} {message &&{message}
}