Files
umami/src/app/(main)/websites/[websiteId]/events/EventsDataTable.tsx
2025-02-21 16:55:05 -08:00

21 lines
529 B
TypeScript

import { useWebsiteEvents } from '@/components/hooks';
import { EventsTable } from './EventsTable';
import { DataGrid } from '@/components/common/DataGrid';
import { ReactNode } from 'react';
export function EventsDataTable({
websiteId,
}: {
websiteId?: string;
teamId?: string;
children?: ReactNode;
}) {
const queryResult = useWebsiteEvents(websiteId);
return (
<DataGrid queryResult={queryResult} allowSearch={true} autoFocus={false}>
{({ data }) => <EventsTable data={data} />}
</DataGrid>
);
}