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.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Remove unused allowEdit/allowView props from WebsitesTable and its callers
Mike Caofab78f1610d0
diff --git a/src/app/(main)/admin/users/[userId]/UserWebsites.tsx b/src/app/(main)/admin/users/[userId]/UserWebsites.tsxindex eeb173e75..7146762b9 100644--- a/src/app/(main)/admin/users/[userId]/UserWebsites.tsx+++ b/src/app/(main)/admin/users/[userId]/UserWebsites.tsx@@ -7,9 +7,7 @@ export function UserWebsites({ userId }) {return (<DataGrid query={queryResult}>- {({ data }) => (- <WebsitesTable data={data} showActions={true} allowEdit={true} allowView={true} />- )}+ {({ data }) => <WebsitesTable data={data} showActions />}</DataGrid>);}diff --git a/src/app/(main)/websites/WebsitesDataTable.tsx b/src/app/(main)/websites/WebsitesDataTable.tsxindex e29106fc4..14089ee99 100644--- a/src/app/(main)/websites/WebsitesDataTable.tsx+++ b/src/app/(main)/websites/WebsitesDataTable.tsx@@ -8,14 +8,10 @@ import { WebsitesTable } from './WebsitesTable';export function WebsitesDataTable({userId,teamId,- allowEdit = true,- allowView = true,showActions = true,}: {userId?: string;teamId?: string;- allowEdit?: boolean;- allowView?: boolean;showActions?: boolean;}) {const { user } = useLoginQuery();@@ -36,13 +32,7 @@ export function WebsitesDataTable({return (<DataGrid query={queryResult} allowSearch allowPaging>{({ data }) => (- <WebsitesTable- data={data}- showActions={showActions}- allowEdit={allowEdit}- allowView={allowView}- renderLink={renderLink}- />+ <WebsitesTable data={data} showActions={showActions} renderLink={renderLink} />)}</DataGrid>);diff --git a/src/app/(main)/websites/WebsitesTable.tsx b/src/app/(main)/websites/WebsitesTable.tsxindex 4b3e13ce3..825d02ff3 100644--- a/src/app/(main)/websites/WebsitesTable.tsx+++ b/src/app/(main)/websites/WebsitesTable.tsx@@ -1,5 +1,5 @@import { DataColumn, DataTable, type DataTableProps, Icon, Text } from '@umami/react-zen';-import { useMemo, type ReactNode } from 'react';+import { type ReactNode, useMemo } from 'react';import { DateDistance } from '@/components/common/DateDistance';import { LinkButton } from '@/components/common/LinkButton';import { SortableLabel } from '@/components/common/SortableLabel';@@ -10,8 +10,6 @@ import { WebsiteSparkline } from './WebsiteSparkline';export interface WebsitesTableProps extends DataTableProps {showActions?: boolean;- allowEdit?: boolean;- allowView?: boolean;renderLink?: (row: any) => ReactNode;}