feat: reset password from on submit

This commit is contained in:
Ephraim Atta-Duncan
2023-08-30 03:09:40 +00:00
committed by Mythie
parent 2ba7df4881
commit fba95a4402

View File

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