diff --git a/src/app/(main)/settings/teams/TeamsTable.tsx b/src/app/(main)/settings/teams/TeamsTable.tsx
index 76778271..65d79e51 100644
--- a/src/app/(main)/settings/teams/TeamsTable.tsx
+++ b/src/app/(main)/settings/teams/TeamsTable.tsx
@@ -1,13 +1,12 @@
'use client';
import { GridColumn, GridTable, Icon, Text, useBreakpoint } from 'react-basics';
-import { useMessages, useLogin } from 'components/hooks';
+import { useMessages } from 'components/hooks';
import Icons from 'components/icons';
import { ROLES } from 'lib/constants';
import LinkButton from 'components/common/LinkButton';
export function TeamsTable({
data = [],
- allowEdit = false,
showActions = true,
}: {
data: any[];
@@ -15,7 +14,6 @@ export function TeamsTable({
showActions?: boolean;
}) {
const { formatMessage, labels } = useMessages();
- const { user } = useLogin();
const breakpoint = useBreakpoint();
return (
@@ -30,34 +28,22 @@ export function TeamsTable({
{row => row._count.teamUser}
-
- {row => {
- const { id, teamUser } = row;
- const owner = teamUser.find(({ role }) => role === ROLES.teamOwner);
- const isOwner = user.id === owner?.userId;
+ {showActions && (
+
+ {row => {
+ const { id } = row;
- return (
- showActions && (
- <>
- {allowEdit && isOwner && (
-
-
-
-
- {formatMessage(labels.edit)}
-
- )}
-
-
-
-
- {formatMessage(labels.switch)}
-
- >
- )
- );
- }}
-
+ return (
+
+
+
+
+ {formatMessage(labels.view)}
+
+ );
+ }}
+
+ )}
);
}
diff --git a/src/app/(main)/settings/websites/WebsitesHeader.tsx b/src/app/(main)/settings/websites/WebsitesHeader.tsx
index 7809b0c4..3ffc1a95 100644
--- a/src/app/(main)/settings/websites/WebsitesHeader.tsx
+++ b/src/app/(main)/settings/websites/WebsitesHeader.tsx
@@ -5,15 +5,15 @@ import WebsiteAddButton from './WebsiteAddButton';
export interface WebsitesHeaderProps {
teamId?: string;
- showActions?: boolean;
+ allowCreate?: boolean;
}
-export function WebsitesHeader({ teamId, showActions = true }: WebsitesHeaderProps) {
+export function WebsitesHeader({ teamId, allowCreate = true }: WebsitesHeaderProps) {
const { formatMessage, labels } = useMessages();
return (
- {!process.env.cloudMode && showActions && }
+ {allowCreate && !process.env.cloudMode && }
);
}
diff --git a/src/components/input/ProfileButton.module.css b/src/components/input/ProfileButton.module.css
index 981bf4a9..1eebcab6 100644
--- a/src/components/input/ProfileButton.module.css
+++ b/src/components/input/ProfileButton.module.css
@@ -20,3 +20,9 @@
text-align: right;
margin-right: 10px;
}
+
+.name {
+ color: var(--font-color200);
+ background: var(--base75);
+ padding: var(--size300) var(--size600);
+}
diff --git a/src/components/input/ProfileButton.tsx b/src/components/input/ProfileButton.tsx
index 2cabbff0..11cf1613 100644
--- a/src/components/input/ProfileButton.tsx
+++ b/src/components/input/ProfileButton.tsx
@@ -4,7 +4,6 @@ import { useRouter } from 'next/navigation';
import Icons from 'components/icons';
import { useMessages, useLogin, useLocale } from 'components/hooks';
import { CURRENT_VERSION } from 'lib/constants';
-import Avatar from 'components/common/Avatar';
import styles from './ProfileButton.module.css';
export function ProfileButton() {
@@ -34,12 +33,7 @@ export function ProfileButton() {
{(close: () => void) => (