mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
Goals components. Removed some completed reports.
This commit is contained in:
parent
7662b77ce3
commit
4552256930
39 changed files with 120 additions and 740 deletions
24
src/app/(main)/websites/[websiteId]/goals/GoalAddButton.tsx
Normal file
24
src/app/(main)/websites/[websiteId]/goals/GoalAddButton.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Button, MenuTrigger, Dialog, Icon, Text, Modal } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { GoalAddForm } from './GoalAddForm';
|
||||
import { Icons } from '@/components/icons';
|
||||
|
||||
export function GoalAddButton({ websiteId }: { websiteId: string }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<MenuTrigger>
|
||||
<Button variant="primary">
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.addGoal)}</Text>
|
||||
</Button>
|
||||
<Modal>
|
||||
<Dialog variant="modal" title={formatMessage(labels.addGoal)}>
|
||||
{({ close }) => <GoalAddForm websiteId={websiteId} onClose={close} />}
|
||||
</Dialog>
|
||||
</Modal>
|
||||
</MenuTrigger>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue