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: remove the second action button in the dashboards table (#3012)

dnazarenkoo78da014b5258
diff --git a/frontend/src/container/ListOfDashboard/index.tsx b/frontend/src/container/ListOfDashboard/index.tsx
index 9a91d72331..60da406603 100644
--- a/frontend/src/container/ListOfDashboard/index.tsx
+++ b/frontend/src/container/ListOfDashboard/index.tsx
@@ -75,8 +75,8 @@ function ListOfAllDashboard(): JSX.Element {
errorMessage: '',
});
- const columns: TableColumnProps<Data>[] = useMemo(
- () => [
+ const columns = useMemo(() => {
+ const tableColumns: TableColumnProps<Data>[] = [
{
title: 'Name',
dataIndex: 'name',
@@ -118,19 +118,19 @@ function ListOfAllDashboard(): JSX.Element {
},
render: DateComponent,
},
- ],
- [],
- );
+ ];
+
+ if (action) {
+ tableColumns.push({
+ title: 'Action',
+ dataIndex: '',
+ width: 40,
+ render: DeleteButton,
+ });
+ }
- if (action) {
- columns.push({
- title: 'Action',
- dataIndex: '',
- key: 'x',
- width: 40,
- render: DeleteButton,
- });
- }
+ return tableColumns;
+ }, [action]);
const data: Data[] = (filteredDashboards || dashboards).map((e) => ({
createdBy: e.created_at,