mirror of
https://github.com/umami-software/umami.git
synced 2026-02-24 06:25:43 +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,34 @@
|
|||
import { ActionButton } from '@/components/input/ActionButton';
|
||||
import { Edit } from '@/components/icons';
|
||||
import { Dialog } from '@umami/react-zen';
|
||||
import { CohortEditForm } from '@/app/(main)/websites/[websiteId]/cohorts/CohortEditForm';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function CohortEditButton({
|
||||
cohortId,
|
||||
websiteId,
|
||||
filters,
|
||||
}: {
|
||||
cohortId: string;
|
||||
websiteId: string;
|
||||
filters: any[];
|
||||
}) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<ActionButton title={formatMessage(labels.edit)} icon={<Edit />}>
|
||||
<Dialog title={formatMessage(labels.cohort)} style={{ width: 800 }}>
|
||||
{({ close }) => {
|
||||
return (
|
||||
<CohortEditForm
|
||||
cohortId={cohortId}
|
||||
websiteId={websiteId}
|
||||
filters={filters}
|
||||
onClose={close}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</Dialog>
|
||||
</ActionButton>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue