mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 10:15:54 +08:00
fix: remove the second action button in the dashboards table (#3012)
This commit is contained in:
parent
20e71ec08a
commit
78da014b52
@ -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) {
|
||||
columns.push({
|
||||
title: 'Action',
|
||||
dataIndex: '',
|
||||
key: 'x',
|
||||
width: 40,
|
||||
render: DeleteButton,
|
||||
});
|
||||
}
|
||||
if (action) {
|
||||
tableColumns.push({
|
||||
title: 'Action',
|
||||
dataIndex: '',
|
||||
width: 40,
|
||||
render: DeleteButton,
|
||||
});
|
||||
}
|
||||
|
||||
return tableColumns;
|
||||
}, [action]);
|
||||
|
||||
const data: Data[] = (filteredDashboards || dashboards).map((e) => ({
|
||||
createdBy: e.created_at,
|
||||
|
Loading…
x
Reference in New Issue
Block a user