From 394fa00d7c0d85b5ae15d9a460bfab66f85e5143 Mon Sep 17 00:00:00 2001 From: Milo Schwartz Date: Mon, 3 Feb 2025 22:47:47 -0500 Subject: [PATCH] fix sorting auth column if no auth closes #149 --- .../settings/resources/ResourcesTable.tsx | 52 +++++++++---------- src/app/[orgId]/settings/resources/page.tsx | 13 +++-- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/app/[orgId]/settings/resources/ResourcesTable.tsx b/src/app/[orgId]/settings/resources/ResourcesTable.tsx index 463c8461..fee92999 100644 --- a/src/app/[orgId]/settings/resources/ResourcesTable.tsx +++ b/src/app/[orgId]/settings/resources/ResourcesTable.tsx @@ -38,7 +38,7 @@ export type ResourceRow = { domain: string; site: string; siteId: string; - hasAuth: boolean; + authState: string; http: boolean; protocol: string; proxyPort: number | null; @@ -165,9 +165,7 @@ export default function SitesTable({ resources, orgId }: ResourcesTableProps) { header: "Protocol", cell: ({ row }) => { const resourceRow = row.original; - return ( - {resourceRow.protocol.toUpperCase()} - ); + return {resourceRow.protocol.toUpperCase()}; } }, { @@ -177,17 +175,23 @@ export default function SitesTable({ resources, orgId }: ResourcesTableProps) { const resourceRow = row.original; return (
- {!resourceRow.http ? ( - - ) : ( - - )} + {!resourceRow.http ? ( + + ) : ( + + )}
); } }, { - accessorKey: "hasAuth", + accessorKey: "authState", header: ({ column }) => { return (