umami/src/app/(main)/reports/ReportsDataTable.tsx

20 lines
471 B
TypeScript
Raw Normal View History

2023-12-03 11:07:03 +00:00
import { useReports } from 'components/hooks';
2023-10-08 01:55:14 +00:00
import ReportsTable from './ReportsTable';
import DataTable from 'components/common/DataTable';
2024-01-30 08:10:25 +00:00
export default function ReportsDataTable({
websiteId,
teamId,
}: {
websiteId?: string;
teamId?: string;
}) {
const queryResult = useReports({ websiteId, teamId });
2023-10-08 01:55:14 +00:00
return (
<DataTable queryResult={queryResult}>
2023-10-15 04:59:54 +00:00
{({ data }) => <ReportsTable data={data} showDomain={!websiteId} />}
2023-10-08 01:55:14 +00:00
</DataTable>
);
}