mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 17:45:38 +01:00
Refactor of team websites.
This commit is contained in:
parent
2552e1d495
commit
dc3818baaa
22 changed files with 61 additions and 208 deletions
|
|
@ -4,7 +4,6 @@ import useUser from 'components/hooks/useUser';
|
|||
import { ROLES } from 'lib/constants';
|
||||
import Link from 'next/link';
|
||||
import { Button, GridColumn, GridTable, Icon, Icons, Text, useBreakpoint } from 'react-basics';
|
||||
import TeamDeleteButton from './TeamDeleteButton';
|
||||
import TeamLeaveButton from './TeamLeaveButton';
|
||||
|
||||
export function TeamsTable({ data = [] }: { data: any[] }) {
|
||||
|
|
@ -26,13 +25,10 @@ export function TeamsTable({ data = [] }: { data: any[] }) {
|
|||
|
||||
return (
|
||||
<>
|
||||
{isOwner && <TeamDeleteButton teamId={id} teamName={name} />}
|
||||
{!isOwner && <TeamLeaveButton teamId={id} teamName={name} />}
|
||||
<Link href={`/settings/teams/${id}`}>
|
||||
<Button>
|
||||
<Icon>
|
||||
<Icons.Edit />
|
||||
</Icon>
|
||||
<Icon>{isOwner ? <Icons.Edit /> : <Icons.ArrowRight />}</Icon>
|
||||
<Text>{formatMessage(isOwner ? labels.edit : labels.view)}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue