Skip to content

Commit

Permalink
Hide the user invite button for selfhosted users
Browse files Browse the repository at this point in the history
  • Loading branch information
heisbrot committed Feb 12, 2024
1 parent f5059f4 commit d362dde
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/modules/users/UsersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -176,14 +177,16 @@ export default function UsersTable({ users, isLoading }: Props) {
}
rightSide={() => (
<>
{users && users?.length > 0 && (
<UserInviteModal>
<Button variant={"primary"} className={"ml-auto"}>
<MailPlus size={16} />
Invite User
</Button>
</UserInviteModal>
)}
{(isLocalDev() || isNetBirdHosted()) &&
users &&
users?.length > 0 && (
<UserInviteModal>
<Button variant={"primary"} className={"ml-auto"}>
<MailPlus size={16} />
Invite User
</Button>
</UserInviteModal>
)}
</>
)}
>
Expand Down

0 comments on commit d362dde

Please sign in to comment.