mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
31 lines
736 B
TypeScript
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>
|
|
);
|
|
}
|