mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 19:15:37 +01:00
Fixed imports.
This commit is contained in:
parent
5f4b83b09c
commit
7838204186
41 changed files with 49 additions and 15298 deletions
31
src/app/(main)/teams/TeamsJoinButton.tsx
Normal file
31
src/app/(main)/teams/TeamsJoinButton.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Button, Icon, Modal, DialogTrigger, Dialog, Text, useToast } from '@umami/react-zen';
|
||||
import { AddUser } from '@/components/icons';
|
||||
import { useMessages, useModified } from '@/components/hooks';
|
||||
import { TeamJoinForm } from './TeamJoinForm';
|
||||
|
||||
export function TeamsJoinButton() {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { toast } = useToast();
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleJoin = () => {
|
||||
toast(formatMessage(messages.saved));
|
||||
touch('teams');
|
||||
};
|
||||
|
||||
return (
|
||||
<DialogTrigger>
|
||||
<Button>
|
||||
<Icon>
|
||||
<AddUser />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.joinTeam)}</Text>
|
||||
</Button>
|
||||
<Modal>
|
||||
<Dialog title={formatMessage(labels.joinTeam)} style={{ width: 400 }}>
|
||||
{({ close }) => <TeamJoinForm onSave={handleJoin} onClose={close} />}
|
||||
</Dialog>
|
||||
</Modal>
|
||||
</DialogTrigger>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue