mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Updated packages.
This commit is contained in:
parent
6799bd113a
commit
67105f2cff
4 changed files with 143 additions and 133 deletions
|
|
@ -1,19 +1,24 @@
|
|||
import { Row } from '@umami/react-zen';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
import { useConfig, useLoginQuery, useMessages } from '@/components/hooks';
|
||||
import { useLoginQuery, useMessages } from '@/components/hooks';
|
||||
import { TeamsJoinButton } from './TeamsJoinButton';
|
||||
import { TeamsAddButton } from './TeamsAddButton';
|
||||
|
||||
export function TeamsHeader({ allowCreate = true }: { allowCreate?: boolean }) {
|
||||
export function TeamsHeader({
|
||||
allowCreate = true,
|
||||
allowJoin = true,
|
||||
}: {
|
||||
allowCreate?: boolean;
|
||||
allowJoin: boolean;
|
||||
}) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { user } = useLoginQuery();
|
||||
const { cloudMode } = useConfig();
|
||||
|
||||
return (
|
||||
<PageHeader title={formatMessage(labels.teams)}>
|
||||
<Row gap="3">
|
||||
{!cloudMode && <TeamsJoinButton />}
|
||||
{allowJoin && user.role !== ROLES.viewOnly && <TeamsJoinButton />}
|
||||
{allowCreate && user.role !== ROLES.viewOnly && <TeamsAddButton />}
|
||||
</Row>
|
||||
</PageHeader>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue