Skip to content

Commit 7acdf66

Browse files
authored
fix(ui): feedback on profile/team/invitation (NangoHQ#2530)
## Describe your changes Fixes https://linear.app/nango/issue/SAM-11/integration-feedback - Change wording - Fix: Admin shown to everybody - Change button shape - Remove input for email - Remove some copy button
1 parent 3c5607a commit 7acdf66

File tree

5 files changed

+13
-22
lines changed

5 files changed

+13
-22
lines changed

packages/webapp/src/pages/Account/InviteSignup.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,21 @@ export const InviteSignup: React.FC = () => {
9393
<DefaultLayout>
9494
<div className="flex flex-col justify-center">
9595
<div className="flex flex-col justify-center mx-4 gap-4">
96-
<h2 className="text-3xl font-semibold text-white text-center">Join a team</h2>
96+
<h2 className="text-3xl font-semibold text-white text-center">{isLogged ? 'Request to join a different team' : 'Join a team'}</h2>
9797
<div className="text-text-light-gray text-sm text-center">
9898
<p>
9999
{data.invitedBy.name} has invited you to transfer to a new team: <strong className="text-white">{data.newTeam.name}</strong> (
100100
{data.newTeamUsers} {data.newTeamUsers > 1 ? 'members' : 'member'})
101101
</p>{' '}
102-
<p>If you accept, you will permanently lose access to your existing team.</p>
102+
{isLogged && <p>If you accept, you will permanently lose access to your existing team.</p>}
103103
</div>
104104
{isLogged && (
105105
<div className="flex gap-2 mt-6 items-center justify-center">
106106
<Button variant={'zinc'} onClick={onDecline} disabled={loadingAccept} isLoading={loadingDecline}>
107-
Cancel
107+
Decline
108108
</Button>
109109
<Button variant={'danger'} onClick={onAccept} disabled={loadingDecline} isLoading={loadingAccept}>
110-
Join new team
110+
Join a different team
111111
</Button>
112112
</div>
113113
)}

packages/webapp/src/pages/Team/Settings.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Admin } from './components/Admin';
1212
export const TeamSettings: React.FC = () => {
1313
const env = useStore((state) => state.env);
1414

15-
const { error, team, loading } = useTeam(env);
15+
const { error, team, isAdminTeam, loading } = useTeam(env);
1616

1717
if (loading) {
1818
return (
@@ -51,7 +51,7 @@ export const TeamSettings: React.FC = () => {
5151
<div className="flex flex-col gap-12 mt-16">
5252
<TeamInfo />
5353
<TeamUsers />
54-
<Admin />
54+
{isAdminTeam && <Admin />}
5555
</div>
5656
</DashboardLayout>
5757
);

packages/webapp/src/pages/Team/components/Info.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const TeamInfo: React.FC = () => {
7070
<div className="flex justify-end gap-1 items-center">
7171
<Button
7272
size={'sm'}
73-
variant={'zombie'}
73+
variant={'zinc'}
7474
onClick={() => {
7575
setName(team.name);
7676
setEdit(false);

packages/webapp/src/pages/Team/components/Users.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export const columns: ColumnDef<ApiUser | ApiInvitation>[] = [
1313
header: 'Name',
1414
size: 180,
1515
cell: ({ row }) => {
16+
if ('created_at' in row.original) {
17+
return '-';
18+
}
19+
1620
return <div className="truncate text-sm">{row.original.name || '-'}</div>;
1721
}
1822
},

packages/webapp/src/pages/User/Settings.tsx

+2-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Skeleton } from '../../components/ui/Skeleton';
55
import { Input } from '../../components/ui/input/Input';
66
import { apiPatchUser, useUser } from '../../hooks/useUser';
77
import DashboardLayout from '../../layout/DashboardLayout';
8-
import { CopyButton } from '../../components/ui/button/CopyButton';
98
import { Pencil1Icon } from '@radix-ui/react-icons';
109
import { useToast } from '../../hooks/useToast';
1110
import { Tooltip, TooltipContent, TooltipTrigger } from '../../components/ui/Tooltip';
@@ -74,7 +73,6 @@ export const UserSettings: React.FC = () => {
7473
disabled={!edit}
7574
after={
7675
<div className="flex gap-1 items-center">
77-
<CopyButton text={name} />
7876
{!edit && (
7977
<Tooltip delayDuration={0}>
8078
<TooltipTrigger asChild>
@@ -101,7 +99,7 @@ export const UserSettings: React.FC = () => {
10199
<div className="flex justify-end gap-1 items-center">
102100
<Button
103101
size={'sm'}
104-
variant={'zombie'}
102+
variant={'zinc'}
105103
onClick={() => {
106104
setName(user!.name);
107105
setEdit(false);
@@ -117,18 +115,7 @@ export const UserSettings: React.FC = () => {
117115
</div>
118116
<div className="flex flex-col gap-5">
119117
<h3 className="font-semibold text-sm text-white">Email</h3>
120-
<Input
121-
ref={ref}
122-
variant={'flat'}
123-
inputSize={'lg'}
124-
value={user!.email}
125-
disabled={true}
126-
after={
127-
<div className="flex gap-1 items-center">
128-
<CopyButton text={user!.email} />
129-
</div>
130-
}
131-
/>
118+
<p className="text-white text-sm">{user!.email}</p>
132119
</div>
133120
</div>
134121
</DashboardLayout>

0 commit comments

Comments
 (0)