2024-08-02 04:05:43 +00:00
|
|
|
import { useWebsiteEvents } from 'components/hooks';
|
|
|
|
|
import EventsTable from './EventsTable';
|
|
|
|
|
import DataTable from 'components/common/DataTable';
|
|
|
|
|
import { ReactNode } from 'react';
|
|
|
|
|
|
|
|
|
|
export default function EventsDataTable({
|
|
|
|
|
websiteId,
|
|
|
|
|
}: {
|
|
|
|
|
websiteId?: string;
|
|
|
|
|
teamId?: string;
|
|
|
|
|
children?: ReactNode;
|
|
|
|
|
}) {
|
|
|
|
|
const queryResult = useWebsiteEvents(websiteId);
|
|
|
|
|
|
|
|
|
|
return (
|
2024-08-27 23:28:03 +00:00
|
|
|
<DataTable queryResult={queryResult} allowSearch={true} autoFocus={false}>
|
2024-08-02 04:05:43 +00:00
|
|
|
{({ data }) => <EventsTable data={data} />}
|
|
|
|
|
</DataTable>
|
|
|
|
|
);
|
|
|
|
|
}
|