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 ( return (
<DataGrid query={queryResult}> <DataGrid query={queryResult}>
{({ data }) => ( {({ data }) => <WebsitesTable data={data} showActions />}
<WebsitesTable data={data} showActions={true} allowEdit={true} allowView={true} />
)}
</DataGrid> </DataGrid>
); );
} }
+1 -11
View File
@@ -8,14 +8,10 @@ import { WebsitesTable } from './WebsitesTable';
export function WebsitesDataTable({ export function WebsitesDataTable({
userId, userId,
teamId, teamId,
allowEdit = true,
allowView = true,
showActions = true, showActions = true,
}: { }: {
userId?: string; userId?: string;
teamId?: string; teamId?: string;
allowEdit?: boolean;
allowView?: boolean;
showActions?: boolean; showActions?: boolean;
}) { }) {
const { user } = useLoginQuery(); const { user } = useLoginQuery();
@@ -36,13 +32,7 @@ export function WebsitesDataTable({
return ( return (
<DataGrid query={queryResult} allowSearch allowPaging> <DataGrid query={queryResult} allowSearch allowPaging>
{({ data }) => ( {({ data }) => (
<WebsitesTable <WebsitesTable data={data} showActions={showActions} renderLink={renderLink} />
data={data}
showActions={showActions}
allowEdit={allowEdit}
allowView={allowView}
renderLink={renderLink}
/>
)} )}
</DataGrid> </DataGrid>
); );
+1 -3
View File
@@ -1,5 +1,5 @@
import { DataColumn, DataTable, type DataTableProps, Icon, Text } from '@umami/react-zen'; 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 { DateDistance } from '@/components/common/DateDistance';
import { LinkButton } from '@/components/common/LinkButton'; import { LinkButton } from '@/components/common/LinkButton';
import { SortableLabel } from '@/components/common/SortableLabel'; import { SortableLabel } from '@/components/common/SortableLabel';
@@ -10,8 +10,6 @@ import { WebsiteSparkline } from './WebsiteSparkline';
export interface WebsitesTableProps extends DataTableProps { export interface WebsitesTableProps extends DataTableProps {
showActions?: boolean; showActions?: boolean;
allowEdit?: boolean;
allowView?: boolean;
renderLink?: (row: any) => ReactNode; renderLink?: (row: any) => ReactNode;
} }