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.

bug: bug double org is fixed

Palash gupta12c14f71baea
diff --git a/frontend/src/container/OrganizationSettings/DisplayName/index.tsx b/frontend/src/container/OrganizationSettings/DisplayName/index.tsx
index 394d42b76c..32b520cb4f 100644
--- a/frontend/src/container/OrganizationSettings/DisplayName/index.tsx
+++ b/frontend/src/container/OrganizationSettings/DisplayName/index.tsx
@@ -38,7 +38,7 @@ function DisplayName({
dispatch({
type: UPDATE_ORG_NAME,
payload: {
- index,
+ orgId,
name: orgName,
},
});
diff --git a/frontend/src/store/reducers/app.ts b/frontend/src/store/reducers/app.ts
index 8c35b748b0..5d697f6004 100644
--- a/frontend/src/store/reducers/app.ts
+++ b/frontend/src/store/reducers/app.ts
@@ -172,16 +172,19 @@ const appReducer = (
case UPDATE_ORG_NAME: {
const stateOrg = state.org || ({} as OrgPayload);
- const { index, name: updatedName } = action.payload;
- const current = stateOrg[index];
+ const { orgId, name: updatedName } = action.payload;
+
+ const orgIndex = stateOrg.findIndex((e) => e.id === orgId);
+
+ const current = stateOrg[orgIndex];
const updatedOrg: OrgPayload = [
- ...stateOrg.slice(0, index),
+ ...stateOrg.slice(0, orgIndex),
{
...current,
name: updatedName,
},
- ...stateOrg.slice(index + 1, stateOrg.length),
+ ...stateOrg.slice(orgIndex + 1, stateOrg.length),
];
return {
diff --git a/frontend/src/types/actions/app.ts b/frontend/src/types/actions/app.ts
index 67036478c6..829d8ad46f 100644
--- a/frontend/src/types/actions/app.ts
+++ b/frontend/src/types/actions/app.ts
@@ -98,7 +98,7 @@ export interface UpdateOrgName {
type: typeof UPDATE_ORG_NAME;
payload: {
name: string;
- index: number;
+ orgId: string;
};
}