feature(dashboard): customize event columns
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { TableButtons } from '@/components/data-table';
|
||||
import { EventsTable } from '@/components/events/table';
|
||||
import { EventsTableColumns } from '@/components/events/table/events-table-columns';
|
||||
import { api } from '@/trpc/client';
|
||||
import { Loader2Icon } from 'lucide-react';
|
||||
|
||||
type Props = {
|
||||
projectId: string;
|
||||
@@ -19,7 +22,22 @@ const Conversions = ({ projectId }: Props) => {
|
||||
},
|
||||
);
|
||||
|
||||
return <EventsTable query={query} />;
|
||||
return (
|
||||
<div>
|
||||
<TableButtons>
|
||||
<EventsTableColumns />
|
||||
{query.isRefetching && (
|
||||
<div className="center-center size-8 rounded border bg-background">
|
||||
<Loader2Icon
|
||||
size={12}
|
||||
className="size-4 shrink-0 animate-spin text-black text-highlight"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</TableButtons>
|
||||
<EventsTable query={query} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Conversions;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { TableButtons } from '@/components/data-table';
|
||||
import EventListener from '@/components/events/event-listener';
|
||||
import { EventsTable } from '@/components/events/table';
|
||||
import { EventsTableColumns } from '@/components/events/table/events-table-columns';
|
||||
import { OverviewFiltersButtons } from '@/components/overview/filters/overview-filters-buttons';
|
||||
import { OverviewFiltersDrawer } from '@/components/overview/filters/overview-filters-drawer';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -74,6 +75,7 @@ const Events = ({ projectId, profileId }: Props) => {
|
||||
enableEventsFilter
|
||||
/>
|
||||
<OverviewFiltersButtons className="justify-end p-0" />
|
||||
<EventsTableColumns />
|
||||
{query.isRefetching && (
|
||||
<div className="center-center size-8 rounded border bg-background">
|
||||
<Loader2Icon
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { TableButtons } from '@/components/data-table';
|
||||
import { EventsTable } from '@/components/events/table';
|
||||
import { EventsTableColumns } from '@/components/events/table/events-table-columns';
|
||||
import { OverviewFiltersButtons } from '@/components/overview/filters/overview-filters-buttons';
|
||||
import { OverviewFiltersDrawer } from '@/components/overview/filters/overview-filters-drawer';
|
||||
import { useEventQueryFilters } from '@/hooks/useEventQueryFilters';
|
||||
@@ -36,6 +37,7 @@ const Events = ({ projectId, profileId }: Props) => {
|
||||
enableEventsFilter
|
||||
/>
|
||||
<OverviewFiltersButtons className="justify-end p-0" />
|
||||
<EventsTableColumns />
|
||||
{query.isRefetching && (
|
||||
<div className="center-center size-8 rounded border bg-background">
|
||||
<Loader2Icon
|
||||
|
||||
Reference in New Issue
Block a user