Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
import { DataGrid } from '@/components/common/DataGrid';
import { useWebsiteSegmentsQuery } from '@/components/hooks';
import { SegmentAddButton } from './SegmentAddButton';
import { SegmentsTable } from './SegmentsTable';
export function SegmentsDataTable({ websiteId }: { websiteId?: string }) {
const query = useWebsiteSegmentsQuery(websiteId, { type: 'segment' });
const renderActions = () => {
return <SegmentAddButton websiteId={websiteId} />;
};
return (
<DataGrid
query={query}
allowSearch={true}
autoFocus={false}
allowPaging={true}
renderActions={renderActions}
>
{({ data }) => <SegmentsTable data={data} />}
</DataGrid>
);
}