Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Update show edit button logic for websites table.

Mike Caod818bf5aafa7
diff --git a/src/app/(main)/settings/websites/WebsitesTable.tsx b/src/app/(main)/settings/websites/WebsitesTable.tsx
index 8460b14d0..1f1353c00 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 && (
<LinkButton href={renderTeamUrl(`/settings/websites/${websiteId}`)}>
<Icon>
<Icons.Edit />