From b578786e62552543e9f03ee304d518f5fca3d0c0 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Thu, 16 Oct 2025 10:11:50 -0700 Subject: [PATCH] add empty state to sites table cols --- src/components/SitesTable.tsx | 76 +++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/src/components/SitesTable.tsx b/src/components/SitesTable.tsx index 476fd336..4ad51688 100644 --- a/src/components/SitesTable.tsx +++ b/src/components/SitesTable.tsx @@ -300,33 +300,65 @@ export default function SitesTable({ sites, orgId }: SitesTableProps) { }, cell: ({ row }) => { const originalRow = row.original; - return ( + return originalRow.exitNodeName ? (
{originalRow.exitNodeName} - {build == "saas" && originalRow.exitNodeName && - ['mercury', 'venus', 'earth', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune'].includes(originalRow.exitNodeName.toLowerCase()) && ( - Cloud - )} + {build == "saas" && + originalRow.exitNodeName && + [ + "mercury", + "venus", + "earth", + "mars", + "jupiter", + "saturn", + "uranus", + "neptune" + ].includes( + originalRow.exitNodeName.toLowerCase() + ) && Cloud}
- ); - }, - }, - ...(env.flags.enableClients ? [{ - accessorKey: "address", - header: ({ column }: { column: Column }) => { - return ( - + ) : ( + "-" ); } - }] : []), + }, + ...(env.flags.enableClients + ? [ + { + accessorKey: "address", + header: ({ + column + }: { + column: Column; + }) => { + return ( + + ); + }, + cell: ({ row }: { row: any }) => { + const originalRow = row.original; + return originalRow.address ? ( +
+ {originalRow.address} +
+ ) : ( + "-" + ); + } + } + ] + : []), { id: "actions", cell: ({ row }) => {