mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
22 lines
581 B
TypeScript
22 lines
581 B
TypeScript
import { ReactNode } from 'react';
|
|
import { useReportsQuery } from '@/components/hooks';
|
|
import { DataGrid } from '@/components/common/DataGrid';
|
|
import { ReportsTable } from './ReportsTable';
|
|
|
|
export function ReportsDataTable({
|
|
websiteId,
|
|
teamId,
|
|
children,
|
|
}: {
|
|
websiteId?: string;
|
|
teamId?: string;
|
|
children?: ReactNode;
|
|
}) {
|
|
const queryResult = useReportsQuery({ websiteId, teamId });
|
|
|
|
return (
|
|
<DataGrid queryResult={queryResult} renderEmpty={() => children}>
|
|
{({ data }) => <ReportsTable data={data} showDomain={!websiteId} />}
|
|
</DataGrid>
|
|
);
|
|
}
|