mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Added teams pages. Refactored hooks.
This commit is contained in:
parent
a2c202fa36
commit
9448aa3ab5
136 changed files with 387 additions and 287 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { Button, Icon, Icons, Modal, ModalTrigger, Text, useToasts } from 'react-basics';
|
||||
import WebsiteAddForm from './WebsiteAddForm';
|
||||
import useMessages from 'components/hooks/useMessages';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import { setValue } from 'store/cache';
|
||||
|
||||
export function WebsiteAddButton({ onSave }: { onSave?: () => void }) {
|
||||
export function WebsiteAddButton({ teamId, onSave }: { teamId: string; onSave?: () => void }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { showToast } = useToasts();
|
||||
|
||||
|
|
@ -22,7 +22,9 @@ export function WebsiteAddButton({ onSave }: { onSave?: () => void }) {
|
|||
<Text>{formatMessage(labels.addWebsite)}</Text>
|
||||
</Button>
|
||||
<Modal title={formatMessage(labels.addWebsite)}>
|
||||
{(close: () => void) => <WebsiteAddForm onSave={handleSave} onClose={close} />}
|
||||
{(close: () => void) => (
|
||||
<WebsiteAddForm teamId={teamId} onSave={handleSave} onClose={close} />
|
||||
)}
|
||||
</Modal>
|
||||
</ModalTrigger>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue