Goals components. Removed some completed reports.

This commit is contained in:
Mike Cao 2025-05-25 08:58:38 -07:00
parent 7662b77ce3
commit 4552256930
39 changed files with 120 additions and 740 deletions

View 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>
);
}