import { NextPage } from "next"; import Image from "next/image"; // components import { EmailForgotPasswordForm, EmailForgotPasswordFormValues } from "components/account"; // layouts import DefaultLayout from "layouts/default-layout"; // services import { UserService } from "services/user.service"; // hooks import useToast from "hooks/use-toast"; // images import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png"; const userService = new UserService(); const ForgotPasswordPage: NextPage = () => { // toast const { setToastAlert } = useToast(); const handleForgotPassword = (formData: EmailForgotPasswordFormValues) => { const payload = { email: formData.email, }; return userService .forgotPassword(payload) .then(() => setToastAlert({ type: "success", title: "Success!", message: "Password reset link has been sent to your email address.", }) ) .catch((err) => { if (err.status === 400) setToastAlert({ type: "error", title: "Error!", message: "Please check the Email ID entered.", }); else setToastAlert({ type: "error", title: "Error!", message: "Something went wrong. Please try again.", }); }); }; return ( <>
Plane Logo

Forgot Password

); }; export default ForgotPasswordPage;