import { useState } from "react"; import axios from "axios"; import Navbar from "./Navbar"; import Footer from "../components/Footer"; const ForgotPassword = () => { const [email, setEmail] = useState(""); const [message, setMessage] = useState(""); const BASE_URL = import.meta.env.VITE_REACT_APP_SECRET; const handleResetPassword = async () => { try { const response = await axios.post(`${BASE_URL}/users/forgotpassword`, { email, }); setMessage(response.data.message); } catch (error) { console.error("Forgot Password Error:", error); setMessage(error.response.data.message); } }; return (
Enter your email address to receive a password reset link:
{message}