From d362dde4720c4058ad6780b2826161cb5df163e7 Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Mon, 12 Feb 2024 11:50:41 +0100 Subject: [PATCH] Hide the user invite button for selfhosted users --- src/modules/users/UsersTable.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/modules/users/UsersTable.tsx b/src/modules/users/UsersTable.tsx index 257ae79b..61d25c69 100644 --- a/src/modules/users/UsersTable.tsx +++ b/src/modules/users/UsersTable.tsx @@ -7,6 +7,7 @@ import DataTableRefreshButton from "@components/table/DataTableRefreshButton"; import { DataTableRowsPerPage } from "@components/table/DataTableRowsPerPage"; import GetStartedTest from "@components/ui/GetStartedTest"; import { ColumnDef, SortingState } from "@tanstack/react-table"; +import { isLocalDev, isNetBirdHosted } from "@utils/netbird"; import dayjs from "dayjs"; import { ExternalLinkIcon, MailPlus, PlusCircle } from "lucide-react"; import { usePathname, useRouter } from "next/navigation"; @@ -176,14 +177,16 @@ export default function UsersTable({ users, isLoading }: Props) { } rightSide={() => ( <> - {users && users?.length > 0 && ( - - - - )} + {(isLocalDev() || isNetBirdHosted()) && + users && + users?.length > 0 && ( + + + + )} )} >