From d818bf5aafa7e6d57372b609f451ceaec8ca9f19 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sun, 4 Feb 2024 21:48:10 -0800 Subject: [PATCH] Update show edit button logic for websites table. --- src/app/(main)/settings/websites/WebsitesTable.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/(main)/settings/websites/WebsitesTable.tsx b/src/app/(main)/settings/websites/WebsitesTable.tsx index 8460b14d..1f1353c0 100644 --- a/src/app/(main)/settings/websites/WebsitesTable.tsx +++ b/src/app/(main)/settings/websites/WebsitesTable.tsx @@ -1,7 +1,7 @@ 'use client'; import { ReactNode } from 'react'; import { Text, Icon, Icons, GridTable, GridColumn, useBreakpoint } from 'react-basics'; -import { useMessages, useLogin, useTeamUrl } from 'components/hooks'; +import { useMessages, useTeamUrl } from 'components/hooks'; import LinkButton from 'components/common/LinkButton'; export interface WebsitesTableProps { @@ -18,11 +18,9 @@ export function WebsitesTable({ showActions, allowEdit, allowView, - teamId, children, }: WebsitesTableProps) { const { formatMessage, labels } = useMessages(); - const { user } = useLogin(); const breakpoint = useBreakpoint(); const { renderTeamUrl } = useTeamUrl(); @@ -37,7 +35,7 @@ export function WebsitesTable({ return ( <> - {allowEdit && (teamId || user.isAdmin) && ( + {allowEdit && (