We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7eccbf6 commit 1975cd6Copy full SHA for 1975cd6
src/app/(uc)/signin/page.js
@@ -51,14 +51,18 @@ export default function Login() {
51
watch,
52
clearErrors,
53
reset,
54
+ setValue,
55
+ getValues
56
} = useForm();
57
const watchAllFields = watch();
58
59
const handleChangeLoginType = () => {
60
setLoginType(prevLoginType => {
61
const loginType = prevLoginType === 'verifyCode' ? 'password' : 'verifyCode';
62
clearErrors();
63
+ const email = getValues('Email')
64
reset();
65
+ setValue('Email', email)
66
return loginType;
67
});
68
};
0 commit comments