feat: reset password from on submit

This commit is contained in:
Ephraim Atta-Duncan
2023-08-30 03:09:40 +00:00
parent 8e42dcb7ee
commit 40767430d9

View File

@ -39,6 +39,7 @@ export const PasswordForm = ({ className }: PasswordFormProps) => {
const {
register,
handleSubmit,
reset,
formState: { errors, isSubmitting },
} = useForm<TPasswordFormSchema>({
values: {
@ -56,6 +57,8 @@ export const PasswordForm = ({ className }: PasswordFormProps) => {
password,
});
reset();
toast({
title: 'Password updated',
description: 'Your password has been updated successfully.',