Merge branch 'feature/m1-authen' of https://github.com/KieIO/grocery-vercel-commerce into release-stable

This commit is contained in:
lytrankieio123 2021-10-01 09:23:43 +07:00
commit 388aa068fd

View File

@ -48,7 +48,7 @@ const FormRegister = ({ onSwitch, isHide }: Props) => {
const onSignupCallBack = (isSuccess: boolean, message?: string) => {
if (isSuccess) {
showMessageSuccess("Create account successfully. Please verify your email to login.")
showMessageSuccess("Create account successfully. Please verify your email to login.", 15000)
} else {
showMessageError(message || LANGUAGE.MESSAGE.ERROR)
}
@ -71,7 +71,7 @@ const FormRegister = ({ onSwitch, isHide }: Props) => {
validationSchema={DisplayingErrorMessagesSchema}
onSubmit={onSignup}
>
{({ errors, touched }) => (
{({ errors, touched, isValid, submitForm }) => (
<Form className="u-form">
<div className="body">
<InputFiledInForm
@ -93,6 +93,7 @@ const FormRegister = ({ onSwitch, isHide }: Props) => {
? errors.password.toString()
: ''
}
onEnter={isValid ? submitForm : undefined}
/>
<div className={styles.passwordNote}>
Must contain 8 characters with at least 1 uppercase and 1