Remove unused allowEdit/allowView props from WebsitesTable and its callers

This commit is contained in:
Mike Cao committed 2026-08-02 11:40:26 -07:00
1 parent be1531edf7
commit fab78f1610
3 files changed
+3 -17

No files matched your search

@@ -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>
);
}
+1 -11
View File
@@ -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>
);
+1 -3
View File
@@ -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;
}