mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
22 lines
575 B
TypeScript
22 lines
575 B
TypeScript
import { useReports } from '@/components/hooks';
|
|
import ReportsTable from './ReportsTable';
|
|
import DataTable from '@/components/common/DataTable';
|
|
import { ReactNode } from 'react';
|
|
|
|
export default function ReportsDataTable({
|
|
websiteId,
|
|
teamId,
|
|
children,
|
|
}: {
|
|
websiteId?: string;
|
|
teamId?: string;
|
|
children?: ReactNode;
|
|
}) {
|
|
const queryResult = useReports({ websiteId, teamId });
|
|
|
|
return (
|
|
<DataTable queryResult={queryResult} renderEmpty={() => children}>
|
|
{({ data }) => <ReportsTable data={data} showDomain={!websiteId} />}
|
|
</DataTable>
|
|
);
|
|
}
|