mirror of
https://github.com/umami-software/umami.git
synced 2026-02-23 05:55:35 +01:00
Pixel/links development. New validations folder. More refactoring.
This commit is contained in:
parent
88639dfe83
commit
247e14646b
136 changed files with 1395 additions and 516 deletions
|
|
@ -0,0 +1,24 @@
|
|||
import { CohortAddButton } from './CohortAddButton';
|
||||
import { useWebsiteCohortsQuery } from '@/components/hooks';
|
||||
import { CohortsTable } from './CohortsTable';
|
||||
import { DataGrid } from '@/components/common/DataGrid';
|
||||
|
||||
export function CohortsDataTable({ websiteId }: { websiteId?: string }) {
|
||||
const query = useWebsiteCohortsQuery(websiteId, { type: 'cohort' });
|
||||
|
||||
const renderActions = () => {
|
||||
return <CohortAddButton websiteId={websiteId} />;
|
||||
};
|
||||
|
||||
return (
|
||||
<DataGrid
|
||||
query={query}
|
||||
allowSearch={true}
|
||||
autoFocus={false}
|
||||
allowPaging={true}
|
||||
renderActions={renderActions}
|
||||
>
|
||||
{({ data }) => <CohortsTable data={data} />}
|
||||
</DataGrid>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue