Updated events page.

This commit is contained in:
Mike Cao 2024-08-07 22:39:36 -07:00
parent 3a97bfe11c
commit c6b8114945
13 changed files with 122 additions and 46 deletions

View file

@ -5,7 +5,6 @@ import { ReactNode } from 'react';
export default function EventsDataTable({
websiteId,
children,
}: {
websiteId?: string;
teamId?: string;
@ -13,12 +12,8 @@ export default function EventsDataTable({
}) {
const queryResult = useWebsiteEvents(websiteId);
if (queryResult?.result?.data?.length === 0) {
return children;
}
return (
<DataTable queryResult={queryResult} allowSearch={false}>
<DataTable queryResult={queryResult} allowSearch={true}>
{({ data }) => <EventsTable data={data} />}
</DataTable>
);