Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: disabled the button when both password are same (#3360)

Palash Gupta5ac105beca19
diff --git a/frontend/src/container/MySettings/Password/index.tsx b/frontend/src/container/MySettings/Password/index.tsx
index 33b8f9c5f2..493f5662b7 100644
--- a/frontend/src/container/MySettings/Password/index.tsx
+++ b/frontend/src/container/MySettings/Password/index.tsx
@@ -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"