mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-16 19:15:58 +08:00
bug: confirm password bug is fixed (#1084)
This commit is contained in:
parent
c94f23a710
commit
147476d802
@ -178,6 +178,20 @@ function SignUp({ version }: SignUpProps): JSX.Element {
|
|||||||
|
|
||||||
const isNameVisible = getIsNameVisible();
|
const isNameVisible = getIsNameVisible();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isPasswordValid(password) && password.length) {
|
||||||
|
setIsPasswordPolicyError(true);
|
||||||
|
} else {
|
||||||
|
setIsPasswordPolicyError(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password !== confirmPassword) {
|
||||||
|
setConfirmPasswordError(true);
|
||||||
|
} else {
|
||||||
|
setConfirmPasswordError(false);
|
||||||
|
}
|
||||||
|
}, [password, confirmPassword]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<WelcomeLeftContainer version={version}>
|
<WelcomeLeftContainer version={version}>
|
||||||
<FormWrapper>
|
<FormWrapper>
|
||||||
@ -246,16 +260,6 @@ function SignUp({ version }: SignUpProps): JSX.Element {
|
|||||||
onChange={(e): void => {
|
onChange={(e): void => {
|
||||||
const updateValue = e.target.value;
|
const updateValue = e.target.value;
|
||||||
setState(updateValue, setConfirmPassword);
|
setState(updateValue, setConfirmPassword);
|
||||||
if (password !== updateValue) {
|
|
||||||
setConfirmPasswordError(true);
|
|
||||||
} else {
|
|
||||||
setConfirmPasswordError(false);
|
|
||||||
}
|
|
||||||
if (!isPasswordValid(updateValue)) {
|
|
||||||
setIsPasswordPolicyError(true);
|
|
||||||
} else {
|
|
||||||
setIsPasswordPolicyError(false);
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
required
|
required
|
||||||
id="UpdatePassword"
|
id="UpdatePassword"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user