umami/src/app/(main)/settings/websites/WebsitesDataTable.tsx
2025-07-06 08:22:29 -07:00

31 lines
736 B
TypeScript

import { WebsitesTable } from './WebsitesTable';
import { DataGrid } from '@/components/common/DataGrid';
import { useWebsitesQuery } from '@/components/hooks';
export function WebsitesDataTable({
teamId,
allowEdit = true,
allowView = true,
showActions = true,
}: {
teamId?: string;
allowEdit?: boolean;
allowView?: boolean;
showActions?: boolean;
}) {
const queryResult = useWebsitesQuery({ teamId });
return (
<DataGrid queryResult={queryResult} allowSearch allowPaging>
{({ data }) => (
<WebsitesTable
teamId={teamId}
data={data}
showActions={showActions}
allowEdit={allowEdit}
allowView={allowView}
/>
)}
</DataGrid>
);
}