/* * Copyright © 2024 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ import { Button, Grid, Paper, Typography } from "@mui/material"; import Link from "next/link"; import { useForm } from "react-hook-form"; import { useRequestResetPassword } from "@/hooks/entities/reset-hooks"; import { useToast } from "@/hooks/useToast"; import { useTranslate } from "@/hooks/useTranslate"; import { PublicContentWrapper } from "../../components/anonymous/PublicContentWrapper"; import { ContentContainer } from "../dialogs"; import { Input } from "../inputs/Input"; export const ResetPasswordRequest = () => { const { t } = useTranslate(); const { toast } = useToast(); const { register, handleSubmit, formState: { errors }, } = useForm<{ email: string }>({ defaultValues: { email: "" }, }); const { mutate: requestReset } = useRequestResetPassword({ onSuccess: () => { toast.success(t("message.reset_success")); }, onError: () => { toast.error(t("message.server_error")); }, }); return (
{ requestReset(payload); })} > {t("title.reset_password")}
); };