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 Password


setEmail(e.target.value)} placeholder="name@example.com" required="required" />

{message}

Already have an account?{" "} Sign in

); }; export default ForgotPassword;