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 (



{" "} {" "} {" "} Forgot{" "} / {" "} Change Password


Enter your email address to receive a password reset link:

setEmail(e.target.value)} placeholder="Enter your email" style={{ width: "80%", marginBottom: "15px" }} />

{message}

); }; export default ForgotPassword;