Skip to content

Commit

Permalink
Merge pull request #55 from ase-101/release-1.x.x
Browse files Browse the repository at this point in the history
ES-729
  • Loading branch information
ase-101 authored Jan 31, 2024
2 parents 52161c1 + b04a97f commit 890cba2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MouseEvent, useCallback, useMemo, useState } from "react";
import { useFormContext, UseFormReturn } from "react-hook-form";
import { Trans, useTranslation } from "react-i18next";
import { useLocation } from "react-router-dom";
import { useNavigate } from "react-router-dom";

import { IconLabelPopover } from "~components/icon-label-popover";
import { ActionMessage } from "~components/ui/action-message";
Expand Down Expand Up @@ -49,6 +49,7 @@ interface ResetPasswordProps {

export const ResetPassword = ({ methods, settings }: ResetPasswordProps) => {
const { t } = useTranslation();
const navigate = useNavigate();

const { control, setValue, getValues } = useFormContext();
const [passwordResetError, setPasswordResetError] = useState<Error | null>(
Expand Down Expand Up @@ -77,9 +78,8 @@ export const ResetPassword = ({ methods, settings }: ResetPasswordProps) => {
const { resetPasswordMutation } = useResetPassword();

const handleBack = useCallback(() => {
setValue("otp", "", { shouldValidate: true });
setStep(ResetPasswordStep.Otp);
}, [step, setStep, setValue]);
navigate(0)
}, []);

const disabledContinue =
!isResetPasswordValid ||
Expand Down

0 comments on commit 890cba2

Please sign in to comment.