mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 01:25:37 +01:00
Remove admin panel if not team-owner
This commit is contained in:
parent
a47f94c577
commit
c302939043
1 changed files with 2 additions and 2 deletions
|
|
@ -26,10 +26,10 @@ export function TeamDetails({ teamId }: { teamId: string }) {
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<Tabs selectedKey={tab} onSelect={(value: any) => setTab(value)} style={{ marginBottom: 30 }}>
|
<Tabs selectedKey={tab} onSelect={(value: any) => setTab(value)} style={{ marginBottom: 30 }}>
|
||||||
<Item key="details">{formatMessage(labels.details)}</Item>
|
<Item key="details">{formatMessage(labels.details)}</Item>
|
||||||
<Item key="admin">{formatMessage(labels.admin)}</Item>
|
{canEdit && <Item key="admin">{formatMessage(labels.admin)}</Item>}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
{tab === 'details' && <TeamEditForm teamId={teamId} allowEdit={canEdit} />}
|
{tab === 'details' && <TeamEditForm teamId={teamId} allowEdit={canEdit} />}
|
||||||
{canEdit && tab === 'admin' && <TeamAdmin teamId={teamId} />}
|
{tab === 'admin' && <TeamAdmin teamId={teamId} />}
|
||||||
</Flexbox>
|
</Flexbox>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue