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 (
|
return (
|
||||||
<Space direction="vertical" size="large">
|
<Space direction="vertical" size="large">
|
||||||
<Typography.Title level={3}>
|
<Typography.Title level={3}>
|
||||||
@ -132,13 +139,7 @@ function PasswordContainer(): JSX.Element {
|
|||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
<Button
|
<Button
|
||||||
disabled={
|
disabled={isDisabled}
|
||||||
isLoading ||
|
|
||||||
currentPassword.length === 0 ||
|
|
||||||
updatePassword.length === 0 ||
|
|
||||||
isPasswordPolicyError ||
|
|
||||||
currentPassword !== updatePassword
|
|
||||||
}
|
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
onClick={onChangePasswordClickHandler}
|
onClick={onChangePasswordClickHandler}
|
||||||
type="primary"
|
type="primary"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user