mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 05:25:57 +08:00
fix: disabled the button when both password are same (#3360)
This commit is contained in:
parent
9a6fcb6b1d
commit
5ac105beca
@ -81,6 +81,13 @@ function PasswordContainer(): JSX.Element {
|
||||
}
|
||||
};
|
||||
|
||||
const isDisabled =
|
||||
isLoading ||
|
||||
currentPassword.length === 0 ||
|
||||
updatePassword.length === 0 ||
|
||||
isPasswordPolicyError ||
|
||||
currentPassword === updatePassword;
|
||||
|
||||
return (
|
||||
<Space direction="vertical" size="large">
|
||||
<Typography.Title level={3}>
|
||||
@ -132,13 +139,7 @@ function PasswordContainer(): JSX.Element {
|
||||
)}
|
||||
</Space>
|
||||
<Button
|
||||
disabled={
|
||||
isLoading ||
|
||||
currentPassword.length === 0 ||
|
||||
updatePassword.length === 0 ||
|
||||
isPasswordPolicyError ||
|
||||
currentPassword !== updatePassword
|
||||
}
|
||||
disabled={isDisabled}
|
||||
loading={isLoading}
|
||||
onClick={onChangePasswordClickHandler}
|
||||
type="primary"
|
||||
|
Loading…
x
Reference in New Issue
Block a user