From ea5ec0733c123250ba5a16b86f41e2c64b107f3a Mon Sep 17 00:00:00 2001 From: Yana Date: Wed, 15 Jan 2025 19:27:22 +0200 Subject: [PATCH] Add name to NodesTable --- .../src/components/nodeTable/NodeTable.tsx | 11 +++++++++++ .../src/components/nodeTable/NodeTableWithAction.tsx | 1 + 2 files changed, 12 insertions(+) diff --git a/explorer-nextjs/src/components/nodeTable/NodeTable.tsx b/explorer-nextjs/src/components/nodeTable/NodeTable.tsx index 2dbf9f6d87..aa67259cee 100644 --- a/explorer-nextjs/src/components/nodeTable/NodeTable.tsx +++ b/explorer-nextjs/src/components/nodeTable/NodeTable.tsx @@ -125,6 +125,17 @@ const NodeTable = ({ nodes }: { nodes: MappedNymNodes }) => { const columns: MRT_ColumnDef[] = useMemo( () => [ + { + id: "name", + header: "", + Header: Name, + accessorKey: "name", + Cell: ({ row }) => ( + + {row.original.name || "-"} + + ), + }, { id: "node", header: "", diff --git a/explorer-nextjs/src/components/nodeTable/NodeTableWithAction.tsx b/explorer-nextjs/src/components/nodeTable/NodeTableWithAction.tsx index 5c0a7adbc2..7445325e0c 100644 --- a/explorer-nextjs/src/components/nodeTable/NodeTableWithAction.tsx +++ b/explorer-nextjs/src/components/nodeTable/NodeTableWithAction.tsx @@ -5,6 +5,7 @@ import NodeTable from "./NodeTable"; const mappedNymNodes = (nodes: IObservatoryNode[]) => nodes.map((node) => { return { + name: node.self_description.moniker, nodeId: node.node_id, identity_key: node.identity_key, countryCode: node.description.auxiliary_details.location || null,